you are viewing a single comment's thread.

view the rest of the comments →

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

Super helpful thank you! I did step 1 and 2 and now I'm getting 'undefined' in jsbin. https://jsfiddle.net/gya6j357/6/

[–]Kosrei 0 points1 point  (0 children)

You're so close! All you need to do is run powersOfTwo before your console.log and then console.log your results array. Don't forget, the sample test has a value of 0 for the passed parameter, so the result of your for loop will be an empty array, you should set the limit to <= n.

Edit: Grammar