JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="a" value="1" />
<br>
<input type="text" id="b" value="2" />
<br>
JavaScript
$(document).ready(function(){
if ($.inArray("",[ $("#a").val(), $("#b").val() ])>=0)
{
alert("Either a or b is Empty!");
}
else
{
alert("Not Empty!");
}
});