10

How to append strings in JavaScript?

9 months ago
raja $9kazbS94Gp

One of the coolest things about ES6 is that it gives us a new way to create strings with dynamic values. These are called template literals, and they are awesome!

let firstName = 'John';

let lastName = 'Doe';

let fullName = `${firstName} ${lastName}`;

// Output: 'John Doe'

How to append strings in JavaScript?

Sat Feb 10, 4:58pm UTC
One of the coolest things about ES6 is that it gives us a new way to create strings with dynamic values. These are called template literals, and they are awesome! let firstName = 'John'; let lastName = 'Doe'; let fullName = `${firstName} ${lastName}`; // Output: 'John Doe'