javascript - Using String.raw() with Node JS -


i'm working on node.js app , use string.raw() part of es 6 standard.

however, when using in documentation:

text = string.raw`hi\n${2+3}!` + text.slice(2); 

it returns syntaxerror: unexpected token illegal character after string.raw.

i think there problem because string.raw() new technology available chrome , firefox yet. however, can use in node.js , how?

the grave character after raw denotes template strings, feature in es6 harmony. can invoke node --harmony flag, feature not yet implemented. reason of syntax error. raw strings unsupported too. if want experimenting feature in server side, check out io.js, fork of node, many es6 features implemented , enabled default.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -