Advertisement
Spocoman

04. Even Powers of 2

Dec 23rd, 2021 (edited)
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function evenPowersOf2(input) {
  2.     let n = Number(input[0]);
  3.  
  4.     for (let i = 0; i <= n; i += 2) {
  5.         console.log(Math.pow(2, i));
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement