Recently i came to know the time complexity for string.length in javascript is 0(1). is there any one who can make me understand why as to get the length we need to go through all the characters and if the string having n characters then it should depend on the n and should cost us 0(n).
I would really appreciate if someone can clear this or can send link for the native implementation of string.length
Thanks in advance :-)