You can use cocos2d-x with the JavaScript bindings, the API is 1-1 with cocos2d-html5: http://www.cocos2d-x.org/.
Also checkout the sample game using the JavaScript bindings on github: https://github.com/jhurt/cocos2d-x/tree/gles20/samples/MoonWarriors