Last active
June 23, 2017 03:43
-
-
Save chriswrightdesign/bfb46fa8f2718fdd5f9709acb8d670a1 to your computer and use it in GitHub Desktop.
drawback - type error
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
const prefix = (prefix, value) => `${prefix}${value}`; | |
prefix('super ', 'dog'); // 'super dog'; | |
// We can’t use our new prefix function inside of the array methods. | |
animals.map(prefix('super '); | |
// Result: TypeError: undefined super is not a function | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment