JSFiddle - React, Tailwind, and code Playground
by Alfie
HTML
<input value="testing" />
<input/>
<input value="testing" />
<input/>
<input/>
<input/>
<button>test</button>
JavaScript
$('button').on('click', function () {
var emptyCnt = 0;
$('input').each(function () {
if (this.value.length == 0) {
emptyCnt++;
}
});
alert(emptyCnt);
});