Last active
August 29, 2015 14:18
-
-
Save kalisjoshua/f30b58b40af6c64b6b6d 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
// What does this code achieve? | |
function toArray(args) { | |
return Array.prototype.slice.call(args); | |
} | |
// When would you use it? Why does it need to be implemented this way? And what about the following code? | |
function log(args) { | |
Function.prototype.apply.call(console.log, console, args); | |
} | |
// Again, what might be the purpose of doing it this way? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment