Getting Started with Modern JavaScript — Template Literals

Photo by Pankaj Patel on Unsplash

Introduced in 2015 with ECMAScript6, template literals let us dynamically construct strings of text and embedded expressions, even multi-line strings of text, in a more elegant way than concatenation.

The syntax is not much different from the old one at first glance:

const newWay = `is cool`;

--

--

--

Frontend Architect • JavaScript Enthusiast • Educative.io Author • ngVikings organizer.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Laravel, ReactJs, Soketi triumvirates: Step by step guide to build a real time WebApp — Part 2

Optional — A Life-Saver

How to Create Your Own Firefox Add-on with React

Props, State, Dispatch

JavaScript Proxy… But With Reflect

Solution: Difficulty upgrading Node Package Manager (NPM)

Vue History Mode — Support Legacy Hash URLs

Building a production grade container for your static JavaScript application

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michael Karén

Michael Karén

Frontend Architect • JavaScript Enthusiast • Educative.io Author • ngVikings organizer.

More from Medium

JavaScript Framework vs Library

Explaining First Class Functions in Javascript

6 Scenarios Where “this” Has Different Values in JavaScript

this keyword in javascript