Использовать строки шаблона.
here is the example,
var val = 'fortnite'
var x = 'I play ${val}';
console.log(x); // I play fortnite
val = 'pubg'
console.log(x); // I play pubg
//so I have made that dynamic using template strings. Use ` key instead for quotes.
[![This is the key][1]][1]