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
I'm in an IT Management degree program, so I'm pretty sure this is a lower level of the course they offer in the dev programs. 😅 It is more comparable to a business degree, just with a focus on IT. My coursework so far has been primarily marketing, management, project management, etc. I've only gotten into actual technical content in the last year. Last term, I took a course that prepped me for the CompTIA A+ (which I passed the cert exam 😀).
The textbook and the lectures have covered HTML and CSS much more thoroughly than Javascript, so I'm kinda struggling with it.