What is var | Sololearn: Learn to code for FREE!


What is var

5/1/2018 9:16:36 AM


5 Answers

New Answer



Var means a variable that you set, now there are two different vars (global and local) for example; var x= 3 function{var y= 5} The var outside the function is global because it’s not inside a function and you guessed it the one inside the function is local and local vars only apply to things inside that function while global variables apply to everything in the code


i dont understand the question


var is variable


var is a variable and you can assign values and strings to vars or boolean to a var. ex. var eggs = 3;