Strings

The string data type involves a sequence of characters and uses string literals.

Examples of valid strings:
  • 'Welcome, visitors.'
  • 'I said, "hello"'
  • 'Numbers like 7 are legal in string literals'
Examples of invalid strings:
  • 'hello (missing closing ')
  • 'I said, 'hello'' (wrong quotation character within the string)
  • "hello" (incorrect delimiters)