wtfjs – the bad part of javascript

新年快樂!為了討君一笑,送上幾句 Javascript:

// 眼見未為真
"string" instanceof String; // false.

// 誰在說謊?
typeof null // object
null === Object // false

// 意料之內
typeof NaN // number
NaN === 'number' // true, of course.

// 邏輯謬誤
NaN === NaN // false

// 數學謬誤
0.1 + 0.2 === 0.3 // false

以上內容由 http://wtfjs.com/ 提供

This entry was posted in Web Design. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>