string interpolation javascript
const age = 3 console.log(`I'm ${age} years old!`)
what is interpolatin in javascript
JavaScript string interpolation is the process of embedding an expression into part of a string.
js string interpolation
var name = "Taimoor"; var country = "Pakistan"; // string interpolation console.log(`I am ${name} and I am from ${country}`);
Interpolation in JS
const name = "John"; console.log(`Welcome ${name}. You have ${2 * 5} new notifications!`);
Source: codetogo.io
javascript Expression Interpolation
const name = 'Jack'; console.log('Hello ' + name); // Hello Jack