I want to merge a argument of a function with a variable
But i don’t know how to do that.
firstDates = [];
function myFunction(partOne) {
partOne + Dates.push(someOtherVar);
}
myFunction(first);
I know that this not works, but what would be the right way?
why not something like this?
Otherwise what you are trying to accomplish is an eval type of set up. This is generally a very bad idea. Don’t use dynamically named variables.