str js code example

Example 1: js string

`hello world`
`hello!
 world!`
`hello ${who}`
escape `<a>${who}</a>`

Example 2: js string

String(thing)

Example 3: js string

let longString = "This is a very long string which needs " +
                 "to wrap across multiple lines because " +
                 "otherwise my code is unreadable.";

Example 4: js string

let longString = "This is a very long string which needs \
to wrap across multiple lines because \
otherwise my code is unreadable.";

Example 5: js string

return 'cat'[1]; // returns "a"