JSFiddle - React, Tailwind, and code Playground

by SO_AMK

HTML

<input type="text" id="q1" value="No"/>

JavaScript

$('#q1').change(function() {
    value = $(this).val();
    if (value.toLowerCase() == "no" || value == "" || value == "null") {
        alert("Value is: " + value + ". And it matched the if statement");
    } else {
        alert("Value is: " + value)
    }
}
);