Allow ECMAScipt 6 syntax on PlayCanvas projects

Since the release of Firefox 57 and Chrome 62, ECMAScript 6 has been now the new Browser JS syntax. It may be nice if we can enable ECMAScript 6 for projects as this would introduce more cleaner code project-wise.

ECMAScript 6 Syntax list

hmm idk but play canvas uses es5 not sure about ES6
but you can look at these links


https://developer.playcanvas.com/en/user-manual/scripting/

You can use ES6 just fine in your PlayCanvas project. Youā€™ll just get warning symbols in the margin because your code wonā€™t work in browsers like IE11, for example. If you donā€™t care about that, you could hide the warnings by adding the following to the top of your script file:

/*jshint esversion: 6 */
2 Likes