I am creating template in string in java script but it is not working
Here is my code please tell me what is wrong in this:
let str=“this is a string”;
let str1=‘this is arnav’s string’;
let p =“Arnav”;
let str2 = “This is $§ second string”;
console.log(str);
console.log(str1);
console.log(str2);
Javascript template
This will work:
> let str=“this is a string”;
> let str1=‘this is arnav’s string’;
> let p =“Arnav”;
> let str2 = `This is ${p} second string`;
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.