Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

149
Visualizações
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 Respostas
Responde à pergunta

0

You need to install NodeJS on your Mac

nodejs download page

about 4 years ago · Juan Pablo Isaza Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda