Is it possible to create a template string as a usual string
let a=\"b:${b}\";
an then convert it into a template string
le
Instead of using eval better is use to regex
Eval it's not recommended & highly discouraged, so please don't use it (mdn eval).
let b = 10; let a="b:${b}"; let response = a.replace(/\${\w+}/ ,b); conssole.log(response);