Say I have a string like so:
const m = 'Map<?,?>';
and an array like so:
const types = ['string', 'boolean'];
and I am looking to generate:
const r = 'Map<string,boolean>'
how can I do that? Note that I don't need to use a question mark in the template string, I can use a different character, maybe like this:
const m = 'Map<%s,%s>';
Also please note that I cannot use ES6 template strings of this nature ${} because my template is not wrapped in a function.
I believe this will work in Node.js:
util.format(m, ...types);
but I guess what I am looking for is a way to use a question mark character (?) instead of using %s.