Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

147
Views
I can not run console log in VSCode

I am brand new, have recently learned HTML and CSS. After starting JavaScript i tried to run this and check it in console log.

// variables

// numeric
var x = 1

x = 24

console.log(x)

I am using VSCode and installed Code Runner. I right clicked to run code and receive this error msg.

[Running] node "/Users/C/Desktop/Project 02/src/index.js"
/bin/sh: node: command not found

[Done] exited with code=127 in 0.021 seconds 

Not sure what to do and I basically started trying to learn Javascript today.

I am using a MacOS - Catalina if that helps.

Thank you for any input and I apologize if this has been asked before, since I just joined Stackoverflow today.

Edit: Thank you for all the help. I needed to download Node.js that fixed the issue.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You need to install NodeJS on your Mac

nodejs download page

about 4 years ago · Juan Pablo Isaza Report

0

Although the syntax is correct, I would recommend defining a variable by the following

There are 3 ways to define a variable:

  • let
  • var
  • const

For your example, we will use let, the modified syntax is given below:

let x = 24
console.log(x);

Secondly, you need nodejs, download it from here and run node .

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!