function greetAliens(aliens) {
let greeting = []
for (let i = 0; i < aliens.length; i++) {
greeting.push("Greetings " + aliens[i]);
}
return greeting
}
console.log(greetAliens(["SpaceKing", "Wegord", "Klingon", "Blorgous", "Vulcan"]));
Created
June 17, 2021 05:12
-
-
Save tripdog/ffa7fb3fceea6fae446677bddf5c70ba to your computer and use it in GitHub Desktop.
Create a function called greetAliens that taks an array and adds a greeting to the aliens
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment