Answers for "interpolated string"

C#
4

f string C#

string name = "John"
Console.WriteLine($"Hello {name}")
Posted by: Guest on June-16-2020
0

string interpolation

/*In order to embed expressions within normal strings,
you would use the following syntax:*/
let a = 5;
let b = 10;
console.log('Fifteen is ' + (a + b) + ' andnnot ' + (2 * a + b) + '.');
// "Fifteen is 15 and
// not 20."

/*Now, with template literals, you are able to make use of the syntactic sugar,
making substitutions like this more readable:*/
let a = 5;
let b = 10;
console.log(`Fifteen is ${a + b} and
not ${2 * a + b}.`);
// "Fifteen is 15 and
// not 20."
Posted by: Guest on January-11-2021
0

string interpolation

var message1 = interpolate("turkey");
console.log(message1); // "My favorite food is turkey!"

var message2 = interpolate("tofurkey");
console.log(message2); // "My favorite food is tofurkey!"
Posted by: Guest on July-30-2021

C# Answers by Framework

Browse Popular Code Answers by Language