Skip to content

Conversation

nafasebra
Copy link

Changed array.length to someStack.length - 1 to prevent an array index out of bounds error. The original line was causing an error, likely because the intended behavior was to access the last element or iterate safely within the array's bounds. This adjustment ensures proper array access without exceeding its limits.

@nafasebra nafasebra closed this Aug 15, 2025
@ljharb
Copy link
Collaborator

ljharb commented Aug 19, 2025

There's no such thing as an "array out of bounds error", and this is attempting to push, not mutate.

@ljharb ljharb added the invalid label Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants