arr.map(function (elem, i) {
return nthFib(elem);
});
//returns a new array with nth fibonacci numbers as elements
WorkWork.map(function (elem, i) {
return nthFib(elem);
})
.then(function (resultArr) {
console.log(resultArr);
})
//logs a new array with nth fibonacci numbers as elements
Method | Time (ms) |
---|---|
Native | |
WorkWork |