The Code

                
                    //Entry point AKA Controller
function getValues() {
    let inputString = document.getElementById('userString').value;

    let inputStringLower = inputString.toLowerCase()

    let inputStringNoSpace = inputStringLower.split(" ").join("");

    let inputClean = inputStringNoSpace.replace(/[.,\/#@!$%\^&\*;:{}=\-_`~()]/g, "");

    let reversedString = checkforPalindrome(inputClean);

    displayResults(reversedString);

}


function checkforPalindrome(userString) {
    let revString = '';

    // reverse the string
    for (let i = userString.length - 1; i >= 0; i = i - 1) {
        revString += userString[i];
    }
    // assign palindrome y/n value here???
    if (revString == userString) {
        return true;
    }

    if (revString != userString) {
        return false;
    }
    //return palindromeT/F ??

    return revString == userString;

}


//incorrect or correct pop up w/ results
function displayResults(revString) {

    // THIS IS MESSY BUT IT WORKS SO ITS GOOD FOR NOW 

    let inputString = document.getElementById('userString').value;

    let inputStringLower = inputString.toLowerCase()

    let inputStringNoSpace = inputStringLower.split(" ").join("");

    let inputClean = inputStringNoSpace.replace(/[.,\/#@!$%\^&\*;:{}=\-_`~()]/g, "");

    let reversedString = checkforPalindrome(inputClean);

    document.getElementById('resultsTrue').textContent = inputClean;
    document.getElementById('resultsFalse').textContent = inputClean;

    if (revString == true) {

        document.getElementById('alertCorrect').classList.remove('invisible');
    }

    if (revString == false) {

        document.getElementById('alertIncorrect').classList.remove('invisible');
    }
}
                
            

The code is structured in three functions

function getValues()

This function fetches the user's input. It also works to clean the input by removing any strange symbols, removing spaces and it also makes the entire string lowercase. This is done so that it'll run through the code with no issues.

function checkforPalindrome()

This part of the function checks to see if the input is a palindrome. It reverses the string and then compares it to the original input. If the two strings match, it is a plaindrome. If the two strings don't match, then it isn't a palindrome. It passes this information along to the next function.

function displayResults()

This part of the function displays the correct or incorrect alert depending on whether or not the input was a palindrome. It also displays the original input so the user may see what it looks like.