Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

152
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!