Operator === | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Operator ===

could you give me examples about this operator? :)

15th Sep 2017, 5:52 PM
Eduardo Alejandro Rivera Calvillo
Eduardo Alejandro Rivera Calvillo - avatar
2 Answers
+ 12
== is used only to tell that the variables are of the same value. === is used to express that the variables have the same value and are of the same type. Example: var a="30"; var b=30; You can say that a==b , but not a===b... because type is not same
15th Sep 2017, 5:53 PM
P R
P R - avatar
+ 1
undefined == null -> true undefined === null -> false 1 + '2' == 12 -> true 1 + '2' === 12 -> false
16th Sep 2017, 8:06 AM
Siroj Samadov
Siroj Samadov - avatar