Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement to default iterator generator function used in the Node and hierarchy classes #200

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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