입력:24/02/19수정:24/02/19

javascript의 특이한 점

  • 답변
Numbers starting in 0 are base 8
018 in base 8 = 18
017 in base 8 = 15 
Strings get compared as numbers in base 10

018 actually gets parsed as 18 (base 10)

토픽: 자바스크립트
소스: 링크
카테고리: 스크랩/유머