Hi everyone, what are the differences between =, ==, and === in JavaScript ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Hi everyone, what are the differences between =, ==, and === in JavaScript ?

= sign in JS

29th Jan 2019, 3:51 PM
Sumpheus
Sumpheus - avatar
4 Answers
+ 19
1) = is used for assigning values to a variable in JavaScript. 2) == is used for comparison between two variables irrespective of the datatype of variable. 3) === is used for comparision between two variables but this will check strict type, which means it will check datatype and compare two values.
29th Jan 2019, 4:29 PM
🅢🅗🅐🅡🅞🅕🇺🇿
🅢🅗🅐🅡🅞🅕🇺🇿 - avatar
29th Jan 2019, 4:29 PM
🅢🅗🅐🅡🅞🅕🇺🇿
🅢🅗🅐🅡🅞🅕🇺🇿 - avatar
+ 3
https://www.sololearn.com/learn/JavaScript/1131/ https://www.sololearn.com/learn/JavaScript/1132/
29th Jan 2019, 4:24 PM
Lambda_Driver
Lambda_Driver - avatar
+ 1
THANKS 😉
29th Jan 2019, 5:05 PM
Sumpheus
Sumpheus - avatar