DEV Community

Discussion on: ✒️ JavaScript syntax mini quiz

Collapse
 
benaston profile image
Ben Aston • Edited

var is not an assignment keyword. If anything, it is a declaration keyword. If you want another way to declare a global variable (in a browser) simply add an id to a DOM node.

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

I'm not sure I follow, can you elaborate on why var is not a means to assign a variable to a space in memory.

Also not sure how a html attributes is a variable unless it has some special relationship that other attributes do not?

Happy to learn new things, not trying to be annoying.