Suppose, in JavaScript, I do like so:
Expand|Select|Wrap|Line Numbers
- var a,b;
- a=document.getElementById("element");
- if(a){b= // . . . et cetera
1. What exactly does the variable a get filled with in line 2? It supposedly becomes a "reference" to the object with the specified ID, but what form does this "reference" take, specifically?
2. What's the purpose of the if() statement in the third line?
Thank you.