Skip to content

Conversation

TrayHard
Copy link
Contributor

@TrayHard TrayHard commented Jun 9, 2023

Current alternative solution works only for arrays of natural numbers and for empty arrays it returns 0 instead of null or Error. This commit fixes these problems.

Current alternative solution works only for arrays of natural numbers and for empty arrays it returns 0 instead of null or Error. This commit fixes these problems.
@egonSchiele
Copy link
Owner

I like the change to add Number.MIN_VALUE. Could you remove the other function? I agree isFirstRun would make sense in production code, but the aim for this repo is readability, and I'd prefer to leave the isFirstRun logic out for that.

@TrayHard
Copy link
Contributor Author

TrayHard commented Dec 5, 2023

@egonSchiele I guess it's done, could you check this out please? Or should I remove 2 other console.log's as well?

@egonSchiele egonSchiele merged commit 00b2847 into egonSchiele:master Dec 7, 2024
@egonSchiele
Copy link
Owner

Sorry it took me a while to get to this one, looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants