I am starting to get my feet wet with js, I am wondering is there an equivalent to Java static variable in node js.
For further actions, you may consider blocking this person and/or reporting abuse
I am starting to get my feet wet with js, I am wondering is there an equivalent to Java static variable in node js.
For further actions, you may consider blocking this person and/or reporting abuse
iProgrammer Solutions Pvt. Ltd. -
Shefali -
ashish -
Ayush Shrivastava -
Top comments (5)
Doesn't Node support the ES6 class syntax? I think you can just do exactly what you want.
wow didn't know it was that easy, thanks!
Classes in ES6+ are really just syntax sugar, so I don't think this actually answers your question in quite the right spirit, but it is a feature you can use :)
I 100% agree with you Ben, but if a feature is there, might as well use it, right?
with
andeval
are features too. You might be better off looking into how functional programming can solve the problem you're solutioneering.