/*
• Alien Colors #3: Turn your if-else chain from Exercise 5-4 into an if-else chain.
o If the alien is green, print a message that the player earned 5 points.
o If the alien is yellow, print a message that the player earned 10 points.
o If the alien is red, print a message that the player earned 15 points.
o Write three versions of this program, making sure each message is printed for the appropriate color alien.
*/
let alien_color: string = 'yellow';
if (alien_color === 'green') {
console.log("Player earned 5 points");
} else if (alien_color === 'yellow') {
console.log("Player earned 10 points");
} else if (alien_color === 'red') {
console.log("Player earned 15 points");
}
To embed this project on your website, copy the following code and paste it into your website's HTML: