Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch(true) {
- case (planet.toUpperCase() === "SUN"):
- text2 = "hero";
- break;
- case (planet.toUpperCase() === "MOON"):
- text2 = "mother";
- break;
- case (planet.toUpperCase() === "MERCURY"):
- text2 = "twin";
- break;
- case (planet.toUpperCase() === "Venus"):
- text2 = "courtesan";
- break;
- case (planet.toUpperCase() === "MARS"):
- text2 = "soldier";
- break;
- default:
- text2 = "planet";
- }
- if(planet === "sun" || planet === "Sun" || planet === "SUn") {
- // text assignment
- }
- if (planet.toLowerCase() === "sun") {
- // text assignment
- }
Add Comment
Please, Sign In to add comment