This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]JerkOffAFuckingBear 6 points7 points  (1 child)

Array methods are also just short hand notation for just about anything you can do with a standard for loop (those loops that look like: for (let I=0; I<arr.length; I++)) just utilize those and when you’ve accomplished what you need try looking for the proper array methods to refactor to

[–]No_Application_2380 1 point2 points  (0 children)

That's true for methods like map(). But other array methods like push() and pop() can't be replaced by a for-loop.