Skip to content

Instantly share code, notes, and snippets.

@Clickys
Last active January 10, 2019 15:35
Show Gist options
  • Save Clickys/4fce82593ee81c2dee28ce971a4dc73a to your computer and use it in GitHub Desktop.
Save Clickys/4fce82593ee81c2dee28ce971a4dc73a to your computer and use it in GitHub Desktop.
Beasts (problems)
function runWithDebugger(func, array) {
if (arguments.length > 1) { // Array is passed as second argument
debugger;
func.apply(null, array);
// func(...array); // es6 way
} else { // Optional array is not passed.
debugger;
func();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment