10

How to append strings in JavaScript?

10 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'

Last Seen
9 months ago
Reputation
0
Spam
0.000
Last Seen
58 minutes ago
Reputation
0
Spam
0.000
Last Seen
52 minutes ago
Reputation
0
Spam
0.000
Last Seen
5 minutes ago
Reputation
0
Spam
0.000
Last Seen
10 minutes ago
Reputation
0
Spam
0.000
Last Seen
33 minutes ago
Reputation
0
Spam
0.000
Last Seen
3 hours ago
Reputation
0
Spam
0.000
Last Seen
14 minutes ago
Reputation
0
Spam
0.000
Last Seen
a few minutes ago
Reputation
0
Spam
0.000
Last Seen
18 minutes ago
Reputation
0
Spam
0.000
Last Seen
34 minutes ago
Reputation
0
Spam
0.000
Last Seen
18 minutes ago
Reputation
0
Spam
0.000