Ich bekomme einen seltsamen Fehler beim Versuch, Array.from
zu Array.prototype.map
zu übergeben.Array.from TypeError: 0 ist keine Funktion
let fn = Array.from.bind(Array); // [Function: bound from]
fn('test') // [ 't', 'e', 's', 't' ]
['test'].map(s => fn(s)) // [ [ 't', 'e', 's', 't' ] ]
['test'].map(fn) // TypeError: 0 is not a function
Full Error:
TypeError: 0 is not a function
at Function.from (native)
at Array.map (native)
at repl:1:10
at REPLServer.defaultEval (repl.js:260:27)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:429:12)
at emitOne (events.js:95:20)
at REPLServer.emit (events.js:182:7)
at REPLServer.Interface._onLine (readline.js:211:10)
Was ist los?