JSFiddle - React, Tailwind, and code Playground

by Taylor Ganser

JavaScript

var scoops = 10;
while (scoops > 0) {
   alert("Another scoop!");
   scoops = scoops - 1;
//start if - else if statement here  
    if (scoops === 10) {
        alert("So much ice cream!");
    }
    else if (scoops === 7){
       alert("MMM PEANUT BRITTLE");
    }
        else if (scoops === 4){
       alert("Brainfreeze!");
    }
        else if (scoops === 2){
       alert("My teeth hurt.");
    }
};

if (scoops === 0){
alert("YOU ARE OUT!");
};