1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-12 17:54:26 +02:00

more oddities

JavaScript is full of oddities .. I definitely wouldn't claim everything works "as it should" .. you don't have to include the gotcha's but I don't know, they're not that confusing for me.
This commit is contained in:
i
2014-10-28 03:56:12 -04:00
parent e126fec972
commit 3921d11155

View File

@@ -105,6 +105,10 @@ null == undefined; // = true
"5" === 5; // = false
null === undefined; // = false
// ...which can result in some weird behaviour...
13 + !0; // 14
"13" + !0; // '13true'
// You can access characters in a string with charAt
"This is a string".charAt(0); // = 'T'