Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Object-Oriented JavaScript Object Basics Dot Notation & Bracket Notation

Roman Brandt
Roman Brandt
806 Points

dog,cat,elefant,fruits? Why? Why do you use this examples?

I want to see real world examples! Ok ok it's useful when I create a Cat finder )) But....

2 Answers

kieran venison
kieran venison
9,093 Points

Real world examples are always good however this is much better than most tutorials which use really really generic implementations which are much harder to understand than this hybrid example. this beats a foo bar example by far

its psychological you are more likely to remember and learn something faster if you can "relate" it to something you have already learned, since it is very likely you have encountered a fruit or a pet or an object in real life, vs the abstract concept, it is in theory, easier to grasp - particularly if it is difficult subject matter.

more info: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2170512/