Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda