diff --git a/array/pop-or-shift.md b/array/pop-or-shift.md index 2fa4706..8528a2c 100644 --- a/array/pop-or-shift.md +++ b/array/pop-or-shift.md @@ -4,6 +4,6 @@ The `.shift` method removes the first element from an array and returns it. To remove the returned item without re-addressing the array and invalidating all references to it, `shift` requires moving the entire array around. -On the other hand, `.pop` can simply subtract 1 from its length. +On the other hand, `.pop` removes the last element of an `Array` by simply subtracting 1 from its length. Then `.shift` is usually much slower than `.pop`.