If "var" is a reserved word why then should it be used to declare a variable? plsss $ome help | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

If "var" is a reserved word why then should it be used to declare a variable? plsss $ome help

reserved words

11th Sep 2016, 10:53 PM
Petersburg IK
Petersburg IK - avatar
5 Respuestas
+ 6
Because it's reserved specifically for the purpose of declaring a variable.
11th Sep 2016, 10:56 PM
Steve
+ 5
var is a reserved word by JavaScript used for the purpose of declaring variable. You can't name your variable var because it's reserved.
22nd Nov 2016, 5:42 PM
Caleb Jore
Caleb Jore - avatar
+ 2
Reserved words are keywords of the language, like var, function, if, else, for, while, switch, etc.
12th Sep 2016, 7:15 AM
Zen
Zen - avatar
+ 2
It means you cannot create a variable by name 'var'.
13th Sep 2016, 5:49 PM
Shashidhar D
Shashidhar D - avatar
0
You can not use the keywords to define your variables as it will not allow.
16th Sep 2016, 6:42 PM
Venkata Bodapati