js create function with infinite arguments code example
Example: node js function infinite parameters
function print(...args) {
args.forEach((arg, index) => {
console.log(arg);
});
}
print('hello', true, new Date());
function print(...args) {
args.forEach((arg, index) => {
console.log(arg);
});
}
print('hello', true, new Date());