Tag Clouds



WTFJS(젠장할 자바스크립트)

PDF
NaN === NaN // false
 
Number.MIN_VALUE> 0;
// true? really? wtf.
// It turns out that MIN_VALUE is the smallest number
// GREATER THAN ZERO, which of course totally makes sense.
 
parseInt('06'); // 6
parseInt('08'); // 0
// remember to pass in the radix!
 
typeof null // object
null === Object // false

(x=[].reverse)() === window // true

NaN === 'number' // true
Infinity === 1/0 // true
0.1 + 0.2 === 0.3 // false

("foo" + + "bar") === "fooNaN" // true

alert(111111111111111111111); // alerts 111111111111111110000

Ajaxian에 재미있는 포스트가 올라왔네요. 요즘 트위터에 한창 떠들던 얘기가 이거였군요. Brian Leroux씨는 자바스크립트의 엿(?) 같은 실행 결과가 담긴 코드들을 취합한 wtfjs.com을 오픈했습니다. ㅋㅋㅋ


Comments

Trackback : http://firejune.com/trackback/1554

  1. ajaxiankr

    RT @firejune: WTFJS (젠장할 자바크립트) http://firejune.com/1554

    Posted by AJAXIAN.KR at from Topsy | reply

     
     
  2. firejune

    헉! 오타입니다. 자바크립트 => 자바스크립트(지우지도 못하고 ㅠ.ㅠ)

    Posted by 파이어준 at from me2day

     
     
  3. Outsider__

    RT @firejune: WTFJS (젠장할 자바크립트) http://firejune.com/1554

    Posted by Outsider at from web | reply

     
     
  4. prixstyle

    당하는만큼 강해지는 JS RT @firejune WTFJS (젠장할 자바스크립트) http://firejune.com/1554

    Posted by su-hyung park at from Topsy | reply

     
     
  5. avatar

    ㅎㅎ 재미있네요.
    그런데 이 부분은 약간 이상하네요.
    typeof null // object
    null === Object // false

    위 기대값은 정상인 거 같고... (Object 는 function type 이므로)
    아마 얘기하고 싶었던 건 다음과 같은 내용 아니었을까 싶네요. ^^
    typeof null // object
    null instanceof Object // false

    Posted by Gloridea at reply edit

     
     
  6. avatar

    그렇네요. 범용 프로그래밍 상식을 가지고 코드를 읽었을 때 요상하게 해석되는 구문들도 못마땅해 하는 것 같습니다.

    Posted by 파이어준 at edit

     
     
  7. avatar

    WTFJS ... String('string') instanceof String
    ajaxian.com - WTFJS, firejune.com - WTFJS(젠장할 자바스크립트), ajaxian.kr - WTFJS: “string” instanceof String 에 언급된 WTFJS(왓 더 삐-_- JS)의 아래 예문을 보고 이것저것 테스트를 해보니 또 재미있..

    Tracked from  April Breeze is blowing... at

     
     
  8. a123_

    w t f ㅋㅋㅋㅋㅋㅋㅋ

    Posted by 흠냐 at from me2day

     
     
  9. azki

    재미있긴한데, 그 아저씨 홈페이지를 살펴보니 좀 어거지두 꽤 있네요 ^^;

    Posted by 아즈키 at from me2day

     
     
  10. pupustory

    우와 …. 이런 재미있는 코드가 ㅋㅋ

    Posted by pupustory at from me2day

     
     
  11. ahastudio

    정말 what da f...군요 ㅠㅠ 요새라면 저런 스펙이 나올 수 없을텐데 말이죠 ㅎㄷㄷ RT @firejune: WTFJS (젠장할 자바크립트) http://firejune.com/1554

    Posted by 아샬 at from Topsy | reply

     
     
  12. shagano01

    RT @firejune WTFJS(젠장할 자바스크립트) http://firejune.com/1554

    Posted by ShagaNo01 at from Topsy | reply

     
     
  13. Dr_rainer

    @firejune http://firejune.com/1554 페이지가 에러나요... 그냥 알려 드리는 거에요^^

    Posted by lee sewoo at from Mixero | reply

     
     
  14. firejune

    @Dr_rainer 감사합니다. 수정완료 했습니다.

    Posted by firejune at from web | reply

     
     
  15. avatar

    captcha