JSFiddle - React, Tailwind, and code Playground

HTML

<style type = "text/css">

    div.red {border-style:solid;border-width:1em; border-color:red; padding:1em;}

    div.blue {border-style:solid;border-width:1em; border-color:blue; padding:1em;}

    div.green {border-style:solid;border-width:1em; border-color:green; padding:1em;}

    div.black {border-style:solid;border-width:1em; border-color:black; padding:1em;}

</head>
</style>

<script language="javascript" type="text/javascript">

        function firstPrompt()
        {
        document.bgColor=('gray')
        var background
            {
                borderColor = window.prompt ("Please enter the border color you want: red, green, or blue.");

                if (borderColor == "red" || borderColor == "green" || borderColor == "blue")
                    {
                    enterWord = window.prompt ("Enter a word in the text field, all alphabetic characters.");
                    secondPrompt();
                    }
                else
                {
                    window.alert ("You didn't enter a valid color (red, green, blue), border color will be black!");
                    borderColor = ('black');
                    enterWord = window.prompt ("Enter a word in the text field, all alphabetic characters.");
                    secondPrompt();
                }
            }
        }



        function secondPrompt()
        {
        if (/[^0-9A-Z" "]/.test(enterWord))
            {
            enterLetter = window.prompt ("Enter a letter in the text field below.")
            findVowels();
            }
        else
        {
            window.alert ("Sorry you entered an invalid word (" + enterWord + ") please re-enter!");
            enterWord = window.prompt ("Enter a word in the text field, all alphabetic characters.");
            secondPrompt();
        }
        }



        function findVowels()
            {
                totalVowels = 0;

                for (i = 0; i < enterWord.length; i++)
                    {
 ...