Reputation: 1145
I am trying to get node.js working now therefore I try to write a simple test function in JavaScript and name it score.js.
var score = 61;
if (score >= 60)
console.log("pass");
else
console.log("failed");
I try to run this but this happened
How may i fix this issue?
Upvotes: 0
Views: 78
Reputation: 106698
You have to execute your scripts using the node
executable, like: node score.js
. Otherwise Windows will try to execute your javascript file with Microsoft's JScript implementation, which is very different.
Upvotes: 2