JS Built-ins
StringString.rawintermediate

String.raw β€” unicode escape not interpreted

πŸ“– Usage Example
String.raw`Hello
World`   // β†’ 'Hello\nWorld'
String.raw`C:\Users\me`    // β†’ 'C:\Users\me'

Use String.raw as a tagged template to get the raw string form where backslash escapes are not processed.

String.raw β€” Unicode Escapes Are Also Raw

In a regular template literal, \u0041 renders as A. In String.raw, it stays as 6 characters.

Challenge: Implement rawUnicode() that returns the 6-character string \u0041 using String.raw.

rawUnicode() // β†’ '\u0041'  (6 chars)
πŸ’‘ Hints (1)
  • β€’ `String.raw\`\u0041\`` β†’ the 6-char string `\u0041`, not `A`.