147
rated 0 times
[
150]
[
3]
/ answers: 1 / hits: 24970
/ 12 Years ago, tue, december 4, 2012, 12:00:00
Consider this string:
var s = A Z;
Its length is 3, as given by s.length
. Using console.log
you can see the string isn't cut and that s[1]
is and
s.charCodeAt(1)
is 0
.
When you alert it in Firefox, you see AZ
. When you alert it in Chrome/Linux using alert(s)
, the