JellySquare
JellySquare

Reputation: 31

Can't run JS on Node.js

I had installed Node.js to run JS codes that I was doing on LeetCode, but I wasn't able to run the code with it, after that I installed on VS Code the extension named Code Runner, but this is what I've got on the output:

[Running] node "d:\Microsoft VS Code\projects\testing.js"

[Done] exited with code=0 in 0.075 seconds

And here's the code:

function sum(a, b) {return a + b;}

sum(10, 20);

I really don't know why this is happening... :(

Upvotes: 0

Views: 86

Answers (1)

RenierC
RenierC

Reputation: 31

Perhaps it's a bit unrelated but since you mention that you do code challenges I find that quick prototyping, or using scratchpads works great to do lots of changes and see them in real time.

Try REPL or CodeSandbox

Note: I personally use condesandbox for it, you just put the variable that you want in a console.log() and it will print on it's own as you go

Upvotes: 1

Related Questions