JSlang.dev

JavaScript Deep Dives with Wolfram. Since 2015
Inclusive, Test-Driven, Spec-Focused, Collaborative.

9+
Years Active
81
Meetups Held
798
Tests Written
59 Tests
on: async

Most Popular

2020

November 19, 2020
Tagged Templates
  • Tagged templates - what the function`s signature
  • What does it return?

    2018

    February 15, 2018
    ES6 - Template literals
    • tagged template strings, are an advanced form of template strings
    • the function can access each part of the template
    • the 1st parameter - receives only the pure strings of the template string
    • the 2nd and following parameters - contain the values of the processed substitution
    • a template string, is wrapped in ` (backticks) instead of \' or "
    • by default, behaves like a normal string
    • can evaluate variables, which are wrapped in "${" and "}"
    • can evaluate any expression, wrapped inside "${...}"
    • on tagged template strings you can use the `raw` property like so `s.raw`
    • `String.raw` as a static function
    • template string, can contain multiline content
    • and expressions inside work too
    hosted by HolidayCheck
    Neumarkter Str. 61, München, Germany