Last active
September 27, 2017 00:40
-
-
Save hkjpotato/1d8a89c4833741c061f7745dd7ac84e6 to your computer and use it in GitHub Desktop.
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
var numOfRequiredArguments = 5; | |
var fn = function() { | |
if (arguments.length < numOfRequiredArguments) { | |
return fn.bind(null, ...arguments); | |
} else { | |
console.log('we already collect 5 arguments: ', [...arguments]); | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment