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 () {
        if($(this).attr('type') == "checkbox") {
            value = $(this).prop('checked') == false ? 0: 1;
        }
        else {
        value = $(this).val();
        }
        alert(value);
    });

});