Last active
January 10, 2019 15:35
-
-
Save Clickys/4fce82593ee81c2dee28ce971a4dc73a to your computer and use it in GitHub Desktop.
Beasts (problems)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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