Skip to content

Conversation

gunnar-miklis
Copy link

Done: Iteration #1 to #7

Copy link

@arekiu arekiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very elegant solutions!

} else {
sum += typeof entry === 'string' ? entry.length : entry
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super good solution! The only thing I think it would be even better is to write the statement with the types we know will be supported, first (in if). And all the rest going to else.
But anyway, in this case, the array to test is already there and the solution works perfectly

@stale
Copy link

stale bot commented May 31, 2023

This pull request has been automatically marked as stale because it didn't have any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 31, 2023
@stale
Copy link

stale bot commented Jun 7, 2023

This pull request is closed. Thank you.

@stale stale bot closed this Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants