Don Stewart writes...
The Bible teaches that God is all-knowing or omniscient. The word "omniscient" comes from two Latin words omnis signifying all, and scientia signifying knowledge.
When we say that God is omniscient it means that He has perfect knowledge of all things. He does not have to learn anything and He has not forgotten anything. God does not have to reason things out, find out things, or learn them gradually. He knows everything that has happened and everything that will happen. God also knows every potential thing that might happen. God even knows those things that humankind has yet to discover. This knowledge is absolute and unacquired.
The omniscience of God means that He has perfect knowledge, perfect understanding, and perfect wisdom as to how to apply the knowledge. .
Don's article includes these words... Because God knows everything, the warnings that He gives humankind need to be taken seriously. Since He knows what will happen in the future any warning He gives is for our benefit.
Read more of Don's article here
The Bible tells us in many places that God knows everything. See a list of verses here...