CharType
DRAFT

Misconception:

A single character written within single quotes (e.g., 'a') is of type char.

Incorrect

A single character is of type char

Correct

A signle character is of type string

Correction
Here is what's right.

In JavaScript, there is no type char and there is no major difference between using single-quoted and double-quoted literals. All these elements are of type string, one of the six primitive data types.

Origin
Where could this misconception come from?

Many programming languages (such as C/C++ and Java) have a special type to denote single characters.

Language

JavaScript

Concepts

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.