JSFiddle - React, Tailwind, and code Playground

HTML

<select name="select" id="select">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
</select>
<br>
    <p>Email address, Confirm Email Address </p>
    #1 <input type="text" name="attendant[]" /><input type="text" name="confirmattendant[]" /><br/>

<div id="container" >
    
</div>

JavaScript

$("select").change(function() {
  
    var select = parseInt($('#select').val() , 10);
    var $clone = '<input type="text" name="attendant[]" /><input type="text" name="confirmattendant[]" /><br/>';
    console.log($clone);
    var html = '';
    for(var i = 1;i< select ; i++){
        html += $clone;
    }
    $('#container').empty().html(html);
 }).change();