loading...

re: Daily Coding Problem #1 VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Two problems I can find. The first is that I don't think you want to do k-=n, rather just k-n. As written, this will only work with pairs with the...
 

Your function does not return anything though. Even if you do return the value of the initial find it won't be a Boolean.

whoops. too much REPL, not enough real code. Should be return typeof a.find(...) !== 'undefined'.

Code of Conduct Report abuse