JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="a" />
<br>
<input type="text" id="b" />
<br>
<input type="text" id="c" />
<br>
<input type="text" id="d" />
<br>
<input type="text" id="e" />
<br>
<input type="text" id="f" />
<br>
<input type="text" id="g" />
<br>
<button id="btn">Calcluate</button>
JavaScript
$("#btn").click(function () {
var result = jQuery.makeArray($("#a, #b")).some(function (o) {
return o.value === "";
});
alert("Does A or B contain an empty string? " + result);
var result = jQuery.makeArray($("input")).some(function (o) {
return o.value === "";
});
alert("Do any inputs contain an empty string? " + result);
});