Skip to content

firstAttempt.js #1

@nicc

Description

@nicc

Loving the repo and notes! I'll play along and give feedback in an issue.

I see where you're going with firstAttempt.js but as you say, this approach can't be generalised because you're manually nesting conditionals and you'll be limited by array length.

Your ideas bullet point is spot on! More of that. It'll allow you to generalise that firstValue, secondValue thing. The way you've named your callback params in the test calls is 👍

Your final solution should only be a few lines long. You're aiming for something very simple and elegant, albeit a bit mind-bending :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions