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
8 months ago
Reputation
0
Spam
0.000
Last Seen
44 minutes ago
Reputation
0
Spam
0.000
Last Seen
5 hours ago
Reputation
0
Spam
0.000
Last Seen
a few minutes ago
Reputation
0
Spam
0.000
Last Seen
about an hour ago
Reputation
0
Spam
0.000
Last Seen
8 minutes ago
Reputation
0
Spam
0.000
Last Seen
54 minutes ago
Reputation
0
Spam
0.000
Last Seen
50 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
5 hours ago
Reputation
0
Spam
0.000
Last Seen
25 minutes ago
Reputation
0
Spam
0.000