I need to create some substrings using the template string. I try to use this code but I have some problem about the auto filling of the template.
Object.keys(optionsParams).forEach(function (key) {
let template = '&${key}=${value}';
let value = optionsParams[key];
url += template;
});
key
and value
variables are not found.
What's the problem?