JSFiddle - React, Tailwind, and code Playground

HTML

Look in the browser console.

JavaScript

function each(stuff, iterator) {
   iterator();
}

function doStuff(cb, ...args) {
   cb();
}

console.group('ARROW FUNCTIONS');

try {
	each([], () => {
		throw new Error('error_1');
	}); 
} catch(e) { 
	console.error(e.stack) 
}

try {
	doStuff(() => {
  	throw new Error('error_2');
	}, 1, 2, 3)
}
catch (e) {
	console.error(e.stack)
}

console.groupEnd();

console.group('REGULAR FUNCTIONS');

try {
	each([], function addItem() {
		throw new Error('error_1');
	}); 
} catch(e) { 
	console.error(e.stack) 
}

try {
	doStuff(function thenPrintResult() {
  	throw new Error('error_2');
	}, 1, 2, 3)
}
catch (e) {
	console.error(e.stack)
}

console.groupEnd();