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

150
Visualizações
Typeof operator returning undefined for everything but 'strings'

I'm currently learning about the "typeof" operator in JavaScript, but the tutorial I'm following gives me different results than what I'm seeing in my console. Using anything other than 'strings' returns undefined. There are a few things I've seen about Automatic Semicolon Insertion, but they seem a bit more complicated than my current issue. Sorry, this might sound silly to the veterans, but for some reason I can't find the answer to the problem.

VS Code Screen Shot

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

you are evaluating code in two different contexts: your module, where your variables exists with a value and in the console where they are undefined, hence the result you see. You can add to typeof in your script directly to see the correct result.

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