JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" class="input" />
<input type="text" class="input" />
<input type="checkbox" class="input">
<button>Get values<button>
JavaScript
$('button').click(function() {
inputs = $('.input');
inputs.each(function() {
var value = $(this).val();
if( $( this ).attr( 'type' ) === 'checkbox' ) {
value = +$(this).is( ':checked' );
}
alert(value);
});
});