I think there is a mistake in the 1st code which you have provided which is for map() method. Where you have written code for anonymous fn call in the return statement you are multiplying current element of array with 3 so the output would be [ 3, 6, 9, 12, 15 ].
Great content! Also, I've written an in-depth article about the 10 most powerful JavaScript array methods. I'd love it if you check out my article and also share it with others who will find it helpful! shivankjshacker.hashnode.dev/10-powerful-javascri…
Chidiadi Anyanwu
Great article!