What is var ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is var ?

20th Feb 2017, 9:30 AM
qwerty12345
3 Answers
+ 1
The <var> tag is a phrase tag. It defines a variable. Supports global and event attributs.
20th Feb 2017, 9:42 AM
Felipe Cruz
Felipe Cruz - avatar
0
<var> is a tag used for declaring a variable. Variable is a temporary storage location which can store particular values assigned to it. These values can be used later when required.
21st Feb 2017, 11:28 AM
Parth Gandhi
Parth Gandhi - avatar
- 1
why is some code written as: var c= document.getElementbyld("canvas1"); var ctx= c.getContext ("2d") And the next way its written as: var canvas= document.getElementbyld("canvas1") var ctx= canvas.getContext ("2") it's not working for me and it looks the same but different..
21st Feb 2017, 5:22 PM
Maura Brady
Maura Brady - avatar