I am learning Javascript with codecademy, and I was doing some comparisons, and for my code I did:
`console.log(1 == 2)`
and it returned False
.
I also did:
`console.log(2*2 === 3)`
and that also returned False
.
To check that I have not made a mistake, I did:
`console.log(1 == 1)`
and that returned True
The instructions tell me that ===
means equal to.
Are there any problems with using ==
instead of ===
? And, which is better to use and why?
Thanks for any help you can give me!