No that's not the problem. This is no different than what game such as World of Warcraft have to deal with, you can't trust the client. The server should be validating the players moves, gear etc.
Sure you can hack the javascript easier than you can a compiled program but that never stopped modders.