JSFiddle - React, Tailwind, and code Playground

by Sean Conaway

JavaScript

var exampleCase = prompt("What would you prefer to eat: cookies, brownies, cake or souls?");
var example = exampleCase.toLowerCase();
if (example === "cookies") {
    var milkCase = prompt("Would you like them with milk? Please answer yes or no.");
    var milk = milkCase.toLowerCase();
    if (milk === "yes") {
        alert("You are a well adjusted human being.");
    } else if (milk === "no") {
        alert("Only Pinkos don't like milk and cookies.  Say howdy to chairman Mao for me.");
    } else {
        alert("I'm sorry, but I only understand people who can spell at a first grade level.  Game over.");
    }
} else if (example === "brownies") {
    var nutsCase = prompt("Would you like them with nuts?  Please answer yes or no.");
    var nuts = nutsCase.toLowerCase();
    if (nuts === "yes") {
        alert("I'm alergic to all nuts.  You're sick for trying to kill me.  Please seek psychiatric help.");
    } else if (nuts === "no") {
        alert("Thank you for being a real American!");
    } else {
        alert("I'm sorry, but I only understand people who can spell at a first grade level.  Game over.");
    }
} else if (example === "cake") {
    var iceCreamCase = prompt("Would you like that with ice cream?  Please answer yes or no.");
    var iceCream = iceCreamCase.toLowerCase();
    if (iceCream === "yes") {
        alert("It must be your birthday.  Happy birthday.  You're one day closer to the end now. =)");
    } else if (iceCream === "no") {
        alert("Not okay.");
    } else {
        alert("I'm sorry, but I only understand people who can spell at a first grade level.  Game over.");
    }
} else if (example === "souls") {
    var screamingCase = prompt("Do you prefer that they are screaming at the time of consumption? Please answer yes or no.");
    var screaming = screamingCase.toLowerCase();
    if (screaming === "yes") {
        alert("Now this is a trip on the crazy train!");
    } else if (screaming === "no") {
        alert("Weenie.");
  ...