NodeJS/JS feature not available?


#1

So, I’ve been playing around with glitch lately, however I have noticed that for some reason

new Set() seems to not work and even error while coding…

Here’s a picture :
image

Anymore info on this would be great :wink:


#2

Does it actually not work or is it just the linting which doesn’t recognise it, so produces the warning in the editor but the code still runs?


#3

Well, it wasn’t working yesterday but when I tested it today, surprising it worked… Not really sure what happened there, also the linter also doesn’t recognize it as well.


#4

You should be able to add a comment at the top of your file to tell the linter that Set is global:

/* global Set */

#5
/* eslint-env es6 */

should work too.