Arguments Optional

On this challenge I was given I was so confused and I didn’t know where to begin, I had to ask help from my peers and it made a bit of sense.

Problem

Appoach

I had a arguments inoder to take out the values in the array which I do not know, secondely I had an if statement which adds the both the parameters and two if statements which checkes if both the parameters is not a number is so it should return undefined.

I returned a function of the second parameter, which adds the answers it found on the previous if statements and the typeof answer should be a string.

Conclusion

As I meantioned above it wasn’t an easy challlenge for me but I hope to practice it and get good at it.