say I have a
function value(num) {
var numHolder = [];
numHolder.push(num);
console.log(num);
}
and I have button with different numbers each invoking the function with different arguments of each button. for example, number 1 button will invoke as
onclick="value(1)"
number 2 button will invoke as
onclick="value(2)"
how can I save these values inside the numHolder array without making the numHolder array global?