Examples | ||
---|---|---|
Numbers | Strings | Booleans |
123 | "hello" | true |
0 | "I like bananas" | false |
456 | "456" |
Have a look at the third example above.
What's the difference between 456 and "456"?
One is a number, and the other is a string whose characters happen to all be numeric.
They're not quite the same thing, even though sometimes Javascript will quietly and automatically convert one to the other.
|