To demonstrate passing variables to an object lookup. It’s a contrived example, but it’s so that you get practice of it.
Well I see now, but generally used are the “obj.name” and "obj[“name”] methods right?
Just whatever is necessary in the code for the program you’re writing. Using objects directly happens a lot in JS programs (and indirectly, everything is an object, so it’s constant in every JS program). So dynamically accessing properties is very common.
Ok Dan, Thanks a lot!