Revealing module JavaScript


Predator Quiz


The above quiz has been designed using a revealing module pattern. This has the advantage of keeping the entire programme self contained, and reduces the possibility of naming conflicts in the future. This style of JavaScript programming is also extremely secure and prevents any prying eyes from being able to access variables or functions from the console. In this case this helps to keep the answers to the quiz a secret.