Unicode escape sequences

Disclaimer: Web front-end study notes, welcome the guidance of God. Contact QQ: 1522025433.

 

Javascipt defines a special sequence that uses 6-bit ASCII characters to represent any 16Unicode internal code. These Unicode escape sequences are all prefixed with \u followed by 4 hexadecimal digits.

Escape characters can be used as: string literals, regular expression literals and identifiers (except keywords).

For example the following string constants are equivalent to "café" ==="caf\u00e9"

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325879562&siteId=291194637