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

153
Vistas
freeCodeCamp Object Lookup challenge need clarification on Dot Notation vs Bracket Notation

I solved the one freeCodeCamp challenge which asked you to turn a Switch/Case statement into an object and access the properties through variables, the solution was result = lookup[val].

I initially got it wrong doing result = lookup.val.

I know it has something to do with the brackets, interpreting as a strings, and that you use dot notation when you know the properties whereas brackets when you don't, but I don't have a good grasp on it conceptually.

I got the answer just swinging in the dark and trying other stuff but can someone explain why it's a bracket vs dot?

about 4 years ago · Juan Pablo Isaza
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