The American Revolutionary Pastor John J Zubly once said:
“To the generality of mankind he gave no written law, but yet left not himself without a witness among them; the words of the law were written in their hearts, their conscience also bearing witness, and their thoughts the mean while excusing or else accusing one another: It cannot be said they were without the law, whilst that they were to do, and what they were to forbear, was written in their hearts.”
The ancient American Prophet Moroni also wrote similarly:
For behold, the Spirit of Christ is given to every man, that he may know good from evil; wherefore, I show unto you the way to judge; for every thing which inviteth to do good, and to persuade to believe in Christ, is sent forth by the power and gift of Christ; wherefore ye may know with a perfect knowledge it is of God.
Source: Moroni 7:16; The Book of Mormon: Another Testament of Jesus Christ