What Is Considered a Whitespace Character in JavaScript?

Find out which characters are considered as "whitespace" in JavaScript

Whitespace refers to a set of characters that can be used to add horizontal or vertical space between characters. These characters and their usage vary among different languages. In JavaScript, a whitespace character can be any of the following:

Character Unicode Decimal Regex
Space U+0020 32
Carriage Return U+000D 13 \r
Form Feed U+000C 12 \f
Vertical Tab U+000B 11 \v
New Line, Line Feed or End-of-Line U+000A 10 \n
Horizontal Tab U+0009 9 \t

Hope you found this post useful. It was published . Please show your love and support by sharing this post.