Minecraft Random Splash- Small

Hello! I made a small (30 splashes) program that displays Minecraft Splash Text. Each time you run the program one of 30 lines is displayed.

Take a look and it and please give me feedback on how I can make it better.
Keep in mind I am a TOTAL newbie to JS :slight_smile:

console.log("Today's random Minecraft splash is:");

//calculates a random number between 1 and nam
const randomSplash = {
    random(nam) {
        let calc = Math.floor(Math.random() * nam) + 1;
        return calc;
    }
}

//the number 30 can be replaced with any other number
//the program will then generate a number between 1 and that number 
let result = randomSplash.random(30)

//All the if instances for each number
if (result === 1) {
    console.log("1. As seen on TV!")
} else if (result === 2) {
    console.log("2. Awesome!")
} else if (result === 3) {
    console.log("3. 100% pure!")
} else if (result === 4) {
    console.log("4. May contain nuts!")
} else if (result === 5) {
    console.log("5. More polygons!")
} else if (result === 6) {
    console.log("6. Moderately attractive!")
} else if (result === 7) {
    console.log("7. Limited edition!")
} else if (result === 8) {
    console.log("8. Flashing letters!")
} else if (result === 9) {
    console.log("9. It's here!")
} else if (result === 10) {
    console.log("10. Best in class!")
} else if (result === 11) {
    console.log("11. It's finished!")
} else if (result === 12) {
    console.log("12. Kind of dragon free!")
} else if (result === 13) {
    console.log("13. Excitement!")
} else if (result === 14) {
    console.log("14. More than 500 sold!")
} else if (result === 15) {
    console.log("15. One of a kind!")
} else if (result === 16) {
    console.log("16. Heaps of hits on YouTube!")
} else if (result === 17) {
    console.log("17. Indev!")
} else if (result === 18) {
    console.log("18. Spiders everywhere!")
} else if (result === 19) {
    console.log("19. Check it out!")
} else if (result === 20) {
    console.log("20. Holy cow, man!")
} else if (result === 21) {
    console.log("21. It's a game!")
} else if (result === 22) {
    console.log("22. Made in Sweden!")
} else if (result === 23) {
    console.log("23. Uses LWJGL!")
} else if (result === 24) {
    console.log("24. Reticulating splines!")
} else if (result === 25) {
    console.log("25. Minecraft!")
} else if (result === 26) {
    console.log("26. Yaaay!")
} else if (result === 27) {
    console.log("27. Singleplayer!")
} else if (result === 28) {
    console.log("28. Keyboard compatible!")
} else if (result === 29) {
    console.log("29. Ingots!")
} else if (result === 30) {
    console.log("30. Exploding creepers!")
} else {
    console.log("Error")
}

You could use a list for example:

console.log("Today's random Minecraft splash is:");

//calculates a random number between 1 and nam
const randomSplash = {
    random(nam) {
        let calc = Math.floor(Math.random() * nam) + 1;
        return calc;
    }
}

//the number 30 can be replaced with any other number
//the program will then generate a number between 1 and that number 
let result = randomSplash.random(30)
var list = [
  "1.",
  "2.",
  "3.",
  "4.",
  "5.",
  "6.",
  "7.",
  "8.",
  "9.",
  "10.",
  "11.",
  "12.",
  "13.",
  "14.",
  "15.",
  "16.",
  "17.",
  "18.",
  "19.",
  "20.",
  "21.",
  "22.",
  "23.",
  "24.",
  "25.",
  "26.",
  "27.",
  "28.",
  "29.",
  "30."
]
console.log(list[result])

this cuts down on redundant else if statements.