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

165
Visualizações
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 à 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