Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function evenPowersOf2(input) {
- let digit = Number(input[0]);
- for (let index = 0; index <= digit; index += 2) {
- let result = Math.pow(2, index)
- console.log(result);
- }
- }
- evenPowersOf2(["3"])
Advertisement
Add Comment
Please, Sign In to add comment