Answers for "#{} js"

16

javascript string interpolation

var animal = "cow";
var str=`The ${animal} jumped over the moon`; // string interpolation
Posted by: Guest on August-02-2019
1

${} js

let x = 5;
console.log("hello world " + x + " times");
console.log(`hello world ${x} times`);
Posted by: Guest on November-17-2020
-1

#{} js

let value = dummy`Ik ben ${name} en ik ben ${age} jaar`;

function dummy() {
   let str = "";
   strings.forEach((string, i) => {
       str += string + values[i];
   });   
   return str;
}
Posted by: Guest on July-06-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language