Today, both are combining their APIs to offer code portability between cocos2d-html5 and cocos2d-x with javascript bindings.
Thus, you will see less and less differences in the code that you write for the latest versions of these two frameworks. I work mainly with cocos2d-x with javascript, knowing that my code is easily adaptable for the Internet.
source share