Sunday, April 12, 2020

ES6 - Template Literals (Template strings)

Watch the video tutorial: ES6 Template Literals (Template strings) #02

In this ES6 JavaScript tutorial we will learn about Template Literals (Template strings).

What are Template Literals?

Template literals are string literals that allows us to embed expressions, multi-line strings and string interpolation.
Template literals are enclosed using backtick ` ` instead of single quotes and double quotes.
Let's print the string Hello World using single and double quotes.
console.log('Hello World');
console.log("Hello World");
Now, let's print the same string using template literal.
console.log(`Hello World`);

1 comment:

  1. Wynn Hotel, Las Vegas, NV - Mapyro
    Find the 목포 출장마사지 Wynn Hotel, 포항 출장마사지 Las Vegas, NV (Mapyro). 속초 출장안마 Address: 3131 S. Las Vegas Blvd. 원주 출장안마 Las Vegas, NV 89109. 김제 출장안마 Phone: (702) 770-7555. Toll Free: 1-702

    ReplyDelete