ProdanTenev

Even Powers of 2

Feb 25th, 2022
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 0.16 KB | None | 0 0
  1. function evenPowers(input) {
  2.     let power = Number(input[0]);
  3.     for (let i = 0; i <= power; i += 2) {
  4.         console.log(Math.pow(2,i));      
  5.     }
  6. }
Advertisement
Add Comment
Please, Sign In to add comment