Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Note encoding and how to add \n

Strings are created by enclosing Unicode characters in double quotes. You can put a double quote inside a string by escaping it with a backslash:

Code Block
language
languagejavascript
themeConfluencejavascript
a = "I can put a quote character, \", in my string using a backslash"

 

Strings can span multiple lines:

Code Block
languagejavascript
themeConfluence
a = "how to add a'
' character"

// -> "how to add a \n character"

 

Strings are UTF-8 encoded.