Last active
July 21, 2017 11:38
-
-
Save oboshto/b9ae0f8b409bc16fb6e51c5b84cc7083 to your computer and use it in GitHub Desktop.
Function.prototype.apply.call example
This file contains hidden or 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
let invokeConsoleMethod = function (customConsole, messages) { | |
Function.prototype.apply.call(customConsole, console, messages); | |
}; | |
// invokeConsoleMethod(console.warn, ['heya', 123, [3,4,5]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment