JSFiddle - React, Tailwind, and code Playground

JavaScript

function alertArguments(...args) {
	window.alert(args.join(', '));
}


function printArguments(...args) {
  args.forEach((arg, index) => {
    console.log(`Argument ${index}:`, arg);
  });
}

printArguments('hello', true, new Date());
alertArguments('hello', true, new Date());