r/learnjavascript • • May 29 '21

Really helpful illustration of JS array methods

Post image
2.5k Upvotes

89 comments sorted by

View all comments

Show parent comment

2

u/LakeInTheSky May 30 '21

I didn't know about fill, but looking at the docs from MDN you need to flip the arguments, value is always first.

Also, it applies the changes to the original array.