If you minify a game on export the source becomes pretty unreadable so that's a good first measure.
It is impossible to entirely prevent hacking in a client based game (server based games can enforce this, but if you don't have a server, it's entirely hackable). Releasing a game as an app does not necessarily add any protection - for example a node-webkit game on Windows is still hackable by the same method you describe, just using native technologies instead of browser technologies.
We could add some simple kind of number encryption, but it would probably cause a performance impact if we used it everywhere. Perhaps some kind of 'secure variable' plugin could address this, but then it won't even solve the problem, you'll just make a determined hacker use a different approach (such as directly modifying the code).
So it's always going to be possible to hack. Be well aware of this if you ever want to offer prizes for high scores in a client-based game!