Created
August 30, 2018 12:59
-
-
Save IsTheJack/d49210e5cf20fe49dd3a1133386f86f9 to your computer and use it in GitHub Desktop.
Ao rodar o código abaixo, ocorre esse erro causado pelo 'numbersMap'. Por que? O que você faria para que esse erro parasse de acontecer?
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 numbers = [1, 2, 3, 4, 5] | |
const numbersMap = numbers.map | |
const double = n => n * 2 | |
const doubleNumbers = numbersMap(double) | |
// Uncaught TypeError: Array.prototype.map called on null or undefined | |
// at map (<anonymous>) | |
// at <anonymous> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment