Answers for "nodejs add variable in string"

5

node js variable inside string

var my_name = 'John';
var s = `hello ${my_name}, how are you doing`;
console.log(s); // prints hello John, how are you doing
Posted by: Guest on May-23-2020
0

insert variable in string javascript

var a = 5;
var b = 10;
console.log(`Fifteen is ${a + b}.`);
// "Fifteen is 15.
Posted by: Guest on June-23-2021

Code answers related to "nodejs add variable in string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language