FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
JavaScript uses the ____ keyword to define variables
A
variable
B
var
C
assign
D
equal
Explanation: 

Detailed explanation-1: -Always declare JavaScript variables with var, let, or const . The var keyword is used in all JavaScript code from 1995 to 2015. The let and const keywords were added to JavaScript in 2015. If you want your code to run in older browsers, you must use var .

Detailed explanation-2: -If you declare a variable, without using “var", the variable always becomes GLOBAL.

Detailed explanation-3: -The three ways to declare variables in JavaScript are by using var, let, and const .

Detailed explanation-4: -var is a keyword, it is used to declare an implicit type variable, that specifies the type of a variable based on initial value.

There is 1 question to complete.