I have recently started programming in javascript and I have noticed that in some examples it is used ==
and in others===
Is there a reason why one of the two in particular is not always used?
I have recently started programming in javascript and I have noticed that in some examples it is used ==
and in others===
Is there a reason why one of the two in particular is not always used?
The symbol
==
is used to evaluate the value, while the===
evaluates value and type. For safety, I advise you to get used to always using the===
.