2

i've installed the latest (complete) version of netbeans (v 8.1) and node.js to learn node.js (Javascript) on my Windows 7 machine.

I created a new Node.js Application Project but I get errormessages when i write template strings like this:

console.log(`STDIN Data Recieved -> ${data.toString().trim()}`);

It says that the backtick was unexpected and it would be an error. The Syntax highlighting fails then in the whole function.

Is there anything i can do?

1
  • The *.js-file runs flawlessly in the commandline Commented May 1, 2016 at 12:10

2 Answers 2

1

The Netbeans TypeScript editor plugin includes support for template strings. I was able to make your sample work with an arbitrary value for data.

let data = 0xABCD;
console.log(`STDIN Data Received -> ${data.toString().trim()}`);

produced this output in the console:

STDIN Data Received -> 43981
Sign up to request clarification or add additional context in comments.

Comments

1

NetBeans 8.1 does not have support for ES6 (ES2015) so using features like template strings (literals) may result in seeing errors in NetBeans. The ES6 support is planned for the next NetBeans release

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.