+ 1
how = , == , === are used in javascript
3 Réponses
+ 2
= for assigning a value to a variable
like var age = 20;
== for comparing two variables whether they are of equal type
=== for comparing two variables whether they are strictly equal
sample code:
var age1= 20; //age1 is just a variable not object
var age2 = new number(20); /* age2 is an object here as we used number constructor function using the keyword new */
alert(age1 == age2); // true
alert(age1 === age2); //false
hope this helps you
0
What is the difference between a variable and an object??
0
An object holds many properties whereas a variable holds only one