0

In JavaScript, we see the object favColor...

is that written that way because 'color' all by itself, being a part of the js language, would cause confusion and/or problems?

12th Jul 2017, 7:19 PM
Michael
Michael - avatar
2 Antworten
+ 6
I had to see your most recent post to understand what part of the JavaScript course you were addressing. But no, you can name your object's properties the way you want to. So in the example given you can change it from 'favColor' to 'color' and it will work all the same ☺
14th Jul 2017, 12:54 AM
Pao
Pao - avatar
+ 1
Paola- Oh, so they just like to mix it up a little bit... kind of break up the monotony? Hmm. Yeah, okay. I'm definitely all for something like that. I just hope they don't get too wild; next thing you know, words are misspelled on purpose, curly brackets are in the cushions of the sofa, and somebody got a bit silly with a permanent black marker, tackling people and drawing semicolons on the back of everyone's pants and mumbling, "Semicolons go on the end!"
15th Jul 2017, 12:31 PM
Michael
Michael - avatar