letperson='Mike';letage=28;// -------------------------// ⭐️ tagged template// -------------------------// ╭tag╮ <-- tag function// │ │ ╭─0─╮ ╭─1──╮ 2 <-- array of strings (p0)letoutput=myTag`That ${person} is a ${age}.`;// ╰──p1───╯ ╰─p2─╯ <-- interpolations (p1, p2 ...)console.log(output);// That Mike is a youngster.// -----------------------// ⭐️ tag function// -----------------------// ╭─arr─╮ ╭─interpolations─╮functionmyTag(strings,personExp,ageExp){ // manipulate array of stringsletstr0=strings[0];// "That "letstr1=strings[1];// " is a "letstr2=strings[2];// "." // manipulate interpolationsletageStr=ageExp>99?'centenarian':'youngster';return`${str0}${personExp}${str1}${ageStr}${str2}`;}