Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b5fcd8c

Browse files
authoredMar 9, 2025··
Update en-US.mdx
1 parent f0a6605 commit b5fcd8c

File tree

1 file changed

+1
-1
lines changed
  • questions/how-do-you-add-remove-and-update-elements-in-an-array

1 file changed

+1
-1
lines changed
 

‎questions/how-do-you-add-remove-and-update-elements-in-an-array/en-US.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ arr[1] = 5; // [1, 5, 3]
2424
console.log(arr); // Final state: [1, 5, 3]
2525
```
2626

27-
_Note:_ If you try to `console.log(arr)` after each operation in some environments (like Chrome DevTools), you may only see the final state of arr. This happens because the console sometimes keeps a live reference to the array instead of logging its state at the exact moment. To see intermediate states properly, store snapshots using console.log([...arr]) or print values immediately after each operation.
27+
**Note**: If you try to `console.log(arr)` after each operation in some environments (like Chrome DevTools), you may only see the final state of `arr`. This happens because the console sometimes keeps a live reference to the array instead of logging its state at the exact moment. To see intermediate states properly, store snapshots using `console.log([...arr])` or print values immediately after each operation.
2828

2929
---
3030

0 commit comments

Comments
 (0)
Please sign in to comment.