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'

Last Seen
4 hours ago
Reputation
0
Spam
0.000
Last Seen
about an hour ago
Reputation
0
Spam
0.000
Last Seen
19 minutes ago
Reputation
0
Spam
0.000
Last Seen
about an hour ago
Reputation
0
Spam
0.000
Last Seen
about an hour ago
Reputation
0
Spam
0.000
Last Seen
7 minutes ago
Reputation
0
Spam
0.000
Last Seen
25 minutes ago
Reputation
0
Spam
0.000
Last Seen
5 minutes ago
Reputation
0
Spam
0.000
Last Seen
2 hours ago
Reputation
0
Spam
0.000
Last Seen
about an hour ago
Reputation
0
Spam
0.000
Last Seen
30 minutes ago
Reputation
0
Spam
0.000
Last Seen
8 months ago
Reputation
0
Spam
0.000