I want to write a function that takes an optional parameter(labeled parameters) and could have anywhere from 0 to infinite values. How do I pass this through into an executed function?
if (parameters === undefined) {
func();
} else{
console.log(parameters)
func(parameters);
console.log(func(parameters));
}
setTimeout(animate, delay, func, delay, parameters);
}```