dorey / JavaScript-Equality-Table

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

White space

rossmills99 opened this issue · comments

Something that I came up against recently, whitespace compared for equality with 0 resolves to true. It's not the same as an empty string because empty string and white space don't compare equally with empty array for example. So I think white space could legitimately be included in the table.

'\n\t ' == 0 true
'\n\t ' == [] false
'' == [] true