You can't stop people from reading your JavaScript, so consider that part of the game open-source. You can use obfuscation to make it difficult. Design your game in such a way that seeing that code won't matter. Mostly this is done by only implementing the user interface, visuals, and sounds on the client-side; everything else in the game is done on your server and communicated between the client and server using AJAX techniques.
Also have a look at phonegap, I haven't used it but it takes html5 code and makes native apps for various phones etc
Here is a small demo of obfuscation
http://wiseloop.com/demo/php-javascript-obfuscator
I would hate to have to reverse engineer a significant program
Bookmarks