-
-
Save codecademydev/6f61e9ee57d60c6b9c740fd8fe62e1db to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Write your code here: | |
function greetAliens(array){ | |
for (let i = 0; i < array.length; i++ ){ | |
console.log('Oh powerful ' + array[i] +', we humans offer our unconditional surrender!'); | |
}; | |
} | |
// When you're ready to test your code, uncomment the below and run: | |
const aliens = ["Blorgous", "Glamyx", "Wegord", "SpaceKing"]; | |
greetAliens(aliens); | |
function greetAlien(array){ | |
for (let i = 0; i < array.length; i++ ){ | |
return `Oh powerful ${array[i]}, we humans offer our unconditional surrender!`; | |
}; | |
}; | |
greetAlien(aliens); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment