2019.isInteger는 안되고
'HelloWorld'.length는 되고
Number.isInteger(2019)는 되는데
String.length('Hello World')는 안되는데
뭔가 일관성이 없는거같은데 이거 왜이런거임?
프로그래밍 언어는 생각없는 새끼들이 발가락으로 만든거임?
뭔가 신박한 이유가 있는건가
2019.isInteger는 안되고
'HelloWorld'.length는 되고
Number.isInteger(2019)는 되는데
String.length('Hello World')는 안되는데
뭔가 일관성이 없는거같은데 이거 왜이런거임?
프로그래밍 언어는 생각없는 새끼들이 발가락으로 만든거임?
뭔가 신박한 이유가 있는건가
해당 댓글은 삭제되었습니다.
알려줘.. 궁금해
완벽하다
뭐야 봐도 모르겠어. 자바스크립트에서는 스트링 넘버 다 똑같은 primitive 타입이라면서 근데 왜 스트링은 좆대로 함수랑 속성 다 그냥 뒤에다 붙여서 쓰는데, 그리고 왜 String.length() 이런식으로는 못쓰게 해논건데?
Number가 객체도 아니고 함수라니 더 햇갈림 ㅋㅋ
어느정도 암기도 필요함. 왜 이렇지? 이건 왜 이거지? 이렇게 접근하면 파멸한다. 그냥 이건 이거구나. 이건 이렇게 되는구나 이해하고 넘어가야한다... 코딩분석가가 아니라 넌 코딩쟁이가 될거거든. 의문을 갖지마.
시발! 승질나서 부랄 탁치고 넘어간다.
찾았음
A string is a primitive value, but you can access all the methods inherited from String.prototype as if it were an object. The property accessor operators (the dot and the bracket notation), temporarily convert the string value to a String object, for being able to access those methods,