Is there a way to create a hash of template strings?
Something like:
const myStrings = {
a: `myStringA${test}`,
b: `myStringB${test}`
}
And then somewhere else, you can do something like: getString(index, test)
, and it can index into the object. I know that the above is wrong, but just wanted to give an example of what I have in mind. For instance, getString(a, "Cat")
would return: myStringACat