Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created April 8, 2020 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/6f61e9ee57d60c6b9c740fd8fe62e1db to your computer and use it in GitHub Desktop.
Save codecademydev/6f61e9ee57d60c6b9c740fd8fe62e1db to your computer and use it in GitHub Desktop.
Codecademy export
// 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