If I have:
var key = "Section";
course.key = "101";
I get told course.key is unidentified
. I'm trying to set course.Section = "101"
. Is there anyway to pass key's value in the second line?
If I have:
var key = "Section";
course.key = "101";
I get told course.key is unidentified
. I'm trying to set course.Section = "101"
. Is there anyway to pass key's value in the second line?
The property key
of course
is undefined. Use bracket notation.
course[key] = "101"
is the same as
course["Section"] = "101"