Reputation: 186
I'm using node.js to run JavaScript in my terminal. When I run the following JavaScript file (testfile.js) in my terminal with the command "node testfile.js", here's what I get:
console.log("meh");
=> meh
So that works fine. But when I make it a function like this:
function sayMeh() {
console.log("meh");
};
sayMeh;
=>
I get no result. Why? How can I test JS to see if it works?
Upvotes: 1
Views: 306