How can i using dynamic values for evaluating expressions? For instance, consider the below example,
var a = 5;
var b = 10;
console.log(`Fifteen is ${a + b} and not ${2 * a + b}.`);
What if a and b are dynamic names? means instead of a and b it can be anything like 'someValue' . how to do something like below? (name can be dynamic)
var 'someValue' = 1;
console.log(`*Fifteen is ${'someValue' + b}* and not ${2 * a + b}.`);
In a nutshell i want to evaluate an expression where the field names are dynamic. So i wont be able to define variables statically. How do i overcome this?