So I have a web application game that runs completely on the client side and just returns the score back to the server to list the highest scorer. Now I have noticed that I can easily manipulate the scores via accessing the variables from the console and injecting my own value! This SUCKS! I am a total noob in this kinda development and have absolutely no clue how I can stop this apart from obfuscating the code and praying to god that the hacker doesn't figure out which variable is he supposed to use! Now I was hoping there are better ways to stop the hacker to gain access of my variables. Could someone help me out with this issue!?
The real problem lies in when you submit the score to the server. Assume the client side can not be trusted at all regardless of the technology you used to create the game. Eventually data needs to come out of the game in the form of an HTTP request that can be easily viewed and modified. Look at this StackOverflow question. When people submit scores, you need to be smart about accepting and validating them.
Don't worry about this stuff until your game is robust and popular enough to warrant the concern. You'll need to analyze the relationships between player and game events and theoretically possible scores in order to make an effective anti-cheat system.