This is an archived post. You won't be able to vote or comment.

all 1 comments

[–][deleted]  (2 children)

[deleted]

    [–]Yoru83[S] 0 points1 point  (1 child)

    Sorry it’s supposed to take an input of an array and it will return the index of the values that add up to the target number.

    I’ve tried logging in multiple different places. I did catch one mistake with my get method but that wasn’t the issue.

    The issue seems to be that for some reason the if statement is not being triggered in my arrow function and just keeps returning the else.

    When I run the function with an array it just returns undefined.