Trusted by students across multiple disciplines!
What is the difference between == and === in javascript? - Answer: == is the soft
comparison. The values must match but the type doesn't have to as javascript will do
the type conversion for us. 5 == "5" //true
=== is the strict comparison. Type and values must match 5 === "5" //false
How do you create a final variable in javascript? - Answer: const number = 42;
The value of a constant can't be changed through reassignment
How do you create a variable in javascript? - Answer: var number = 100;
What are the javascript data types? - Answer: Number
String
Boolean
Object
Undefined
What is the var keyword? - Answer: It is one of three ways to create a variable in
javascript. It has a global or function scope. It means variables defined outside the
function can be accessed globally, and variables defined inside a particular function can
be accessed within the function.
Var number = 100;
What is the let keyword? - Answer: More often used than the var keyword nowadays. It
is another way to create a variable however, it is only block scoped. It can't be
accessible outside the particular block of code.
Let x = 1;
1
APPHIA - Crafted with Care and Precision for Academic Excellence.