Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Node.js support let keyword? [duplicate]

In Javascript 1.7 the let keyword introduces block scope. This is arguably the most needed feature of Javascript and I was wondering if Node.js supports it.

Part of my difficult in ascertaining this is Node runs Google's V8 engine, which comes from such and such standard and I don't know how these line up with the Javascript x.y version numbers.

like image 909
djechlin Avatar asked Mar 07 '13 23:03

djechlin


1 Answers

Yes, the let keyword is supported, provided you run Node with the --harmony flag. However, I wouldn't recommend using let in production software. (by the way, you could have found this answer via search, before you asked a new question)

like image 77
Elliot Bonneville Avatar answered Sep 24 '22 23:09

Elliot Bonneville