From 3921d11155780f8219a8110d8fe4ede88c9fcadf Mon Sep 17 00:00:00 2001 From: i Date: Tue, 28 Oct 2014 03:56:12 -0400 Subject: [PATCH] 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. --- javascript.html.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/javascript.html.markdown b/javascript.html.markdown index cc210c4a..2dece277 100644 --- a/javascript.html.markdown +++ b/javascript.html.markdown @@ -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'