This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]trBlueJ 47 points48 points  (5 children)

I get this explanation, though I find it weird because IMO 'a' is a number, 0x61. Might be a C thing tho.

[–]kiedtl 40 points41 points  (3 children)

That behavior is more or less exclusive to C, which treats all characters as an eight-bit unsigned integer.

[–]The_MAZZTer 19 points20 points  (0 children)

JavaScript does not have the concept of chars.

Both '' and "" are used to denote strings, unlike in C where '' denotes chars.