javascript tagged template strings in ES6 (new string functions tutorial )




Understanding new template strings and string functions that are part of ES6 / ES 2015 release.

– Introduction to template string
– interpolation in string templates
– Tagged string templates
– New functions such as startsWith, endsWith, includes, repeat and String.raw

startsWith endsWith includes repeat

Original source


15 responses to “javascript tagged template strings in ES6 (new string functions tutorial )”

  1. Thanks again,
    However this line:
    let raw = String.raw' Not a newline:n';
    didn't work in my latest version of Chrome browser.
    I actually have a native function named String.raw:
    function raw() { [native code] }

    but it doesn't accept th line
    (getting an error: "Uncaught SyntaxError: Unexpected string")

Leave a Reply