JSFiddle - React, Tailwind, and code Playground
HTML
<input value="111">
<input value="222">
<input value="111">
<input value="333">
JavaScript
$('input').each(function () {
var $this = $(this);
var val = $this.val();
vals.push(val);
});
for (var i = 0; i < vals.length; i++) {
for (var n = 0; n < vals.length; n++) {
if (n !== i) {
if (vals[i] === vals[n]) {
alert('There are similar values');
}
}
}
}