Search code examples
javascriptframeworksecmascript-6cocos2d-js

Can I use ecmascript 6 in cocos2d JS?


Does cocos2d js support latest standard for javascript? I would like to use it in my project.


Solution

  • Don't know exaclty if cocos supports ES6, but I tried to push an array into another array by using ES6:

    array1.push(...array2);
    

    It seems to work. Nevertheless I don't think you will need ES6 for cocos2d-js, because it's a huge library, which provides you all the features you need.