Explain about Javascript String.charAt()

--

String.charAt() method return a new string including of the single the encoding is variable-length code unit located at the offset into the string, an example is below:

Let me explain we know programming language start count from zero variable myString the first letter is I equal 0(zero), and in the string empty space also count as a number so that the variable index value is 7 equal m; I=0, empty space =1, L=2, o=3, v=4, e=5, empty space =6, m=7

--

--

No responses yet