I have a string and array
var s1 = "hello %s, i am %d years old";
var s2 =[John,24];
Expected result:
s3 = hello John i am 24 years old
I want to save the output into another string. I'm able to display output in console
console.log(s1, ...s2)
But not able to store in other string. I tried many things like:
var s3 = s1.format(...s2)
Any suggestions?