r/learnjavascript • u/somethingsilver97 • Feb 11 '26
Can some explain this?
I'm taking a class that includes beginners Javascript. I got this question in a practice quiz. Couldn't all of the options be correct? What did I misunderstand?
Question: How are objects declared and initialized in JavaScript?
- Using the reserved word var followed by an identifier and an equal sign and the pairs label: value of the elements between curly brackets and separated by commas
2.Using the reserved word function followed by an identifier and an equal sign and the pairs label: value of the elements between curly brackets and separated by commas
3.Using the reserved word let followed by an identifier and an equal sign and the pairs label: value of the elements between curly brackets and separated by commas
4. Using the reserved word const followed by an identifier and an equal sign and the pairs label: value of the elements between curly brackets and separated by commas
View all comments
Show parent comment
1
u/somethingsilver97 Feb 12 '26
That makes sense. I never even considered those types of devices.
This class is primarily HTML and CSS. The Javascript portion is only about 10% of the content.
I think it's not as comprehensive since I'm in an IT Management degree program. I'm sure the dev degree programs have more classes on web development, or higher level ones. I was thinking about switching, though. One of the assignments was to build a resume website, and I really enjoyed the process. It reminds me of the parts of my current job I actually like.