+ 1

how = , == , === are used in javascript

23rd Jun 2016, 9:19 AM
Sumanth Reddy
Sumanth Reddy - avatar
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
23rd Jun 2016, 9:19 AM
Sumanth Reddy
Sumanth Reddy - avatar
0
What is the difference between a variable and an object??
26th Jun 2016, 5:42 PM
Ashley
0
An object holds many properties whereas a variable holds only one
9th Jul 2016, 4:58 PM
Sumanth Reddy
Sumanth Reddy - avatar