DEV Community

Cover image for map() method explained : JS

map() method explained : JS

Rahul on November 19, 2020

JavaScript methods are actions that can be performed on objects. So here is my new blog post I will cover the two JavaScript methods map() and fil...
Collapse
 
ozerhakan profile image
Hakan Özer

Hi Rahul,
Thanks for map article but I want to make a small fix :D

let nums = [11, 12, 13, 14];
let cats = nums.map ( ( ) => 'cats');
// cats = [cat, cat, cat, cat ] => returns cats :D