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.
How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
10 plus years* active enterprise development experience and a Fine art degree 🎨
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 anid
to a DOM node.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.