Skip to content

Conversation

gregdolley
Copy link

@gregdolley gregdolley commented Nov 28, 2022

There's no need to call reverse() on the "next" array if you insert elements into the array in reverse order via unshift() (in the inner for loop) instead of push() (how it was being done originally).

Also got rid of the temp "n" variable in the inner for() loop - just compare "i" directly against children.length.

There's no need to call reverse() on the "next" array if you insert elements into the array in reverse order via unshift() (in the inner for loop) instead of push() (how it was being done originally).
@gregdolley gregdolley changed the title Improvement to default iterator generator function used in Improvement to default iterator generator function used in the Node and hierarchy classes Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant