Daily Coding: Day One
I recently signed up for this website in a continued effort to keep my skills sharp but to also have something fun to do. I don’t know that I will always do it, or always post my solution, but I will endeavor for both. It’s a pickle!
1 | Given a list of numbers and a number k, return whether any two numbers from the list add up to k. |
And here is my crack at it
1 | function findNumbers(listOfNumbers, k) { |
Output of this is
1 | /usr/local/bin/node ./dayOne.js |
Fun! A usable version is here via JSFiddle but overall this is a pretty simple solution which I could probably optimize beyond the fifteen minutes I took to get it but it works and the mantra is always make it work, make it good, make it fast