I'm relatively new to JS and HTML and was following this tutorial ( <https://www.youtube.com/watch?v=iaeCSh7YJDM&t=422s> ) in order to turn a select box and input box into a dynamic form field in order to add as many of them as needed with an add button. The add button works perfectly, though after implementing the same code as in the video, the remove button does not function and I can't quite figure out why. I've gone back and rewatched and cross checked the videos code and mine though can't seem to see what I'm missing. Any help would be greatly appreciated. Below is the section of code I have.

HTML

```
<div class="form-group row" id = "addF" >
                <label class="col-sm-3 col-lg-3 col-md-3 form-control-label">
                    Label
                </label>
                <div class="col-sm-4 col-lg-4 col-md-4">
                <select class="form-control" id="xxxx" name="yyyyy" required>
                        <option class="placeholder" selected disabled value="" style="display:none;">Select Fact</option>
                </select>
                </div>
                <div class="col-sm-3 col-lg-3 col-md-3">
                    <input type="text" class="form-control" id=vvvv" name="zzzz" required>
                </div>
                <div class="col-sm-1 col-lg-1 col-md-1">
                <input type="button" id="add_fact()" onClick="addFact()" value="+">
                </div>
            </div>

```

JS

```
<script type="text/javascript">
        var i =1;

        function addFact(){
            i++;
            var div = document.createElement('div');
            div.innerHTML = '<label class="col-sm-3 col-lg-3 col-md-3 form-control-label">Label '+i+'</label><div class="col-sm-4 col-lg-4 col-md-4"> <select class="form-control" id="xxxx'+i+'" name="yyyy_'+i+'" required><option class="placeholder" selected disabled value="" style="display:none;">Select Fact</option></select></div><div class="col-sm-3 col-lg-3 col-md-3"> <input type="text" class="form-control" id="vvvv" name="zzzz_'+i+'" required></div><div class="col-sm-1 col-lg-1 col-md-1"><input type="button" id="add_fact()" onClick="addFact()" value="+"></div><div class="col-sm-1 col-lg-1 col-md-1"><input type="button" value="-" onClick="removeFact(this)"></div>';
            document.getElementById('addF').appendChild(div);

        function removeFact(div) {
            document.getElementById('addF').removeChild(div.parentNode);
            i--;
        }
</script>

```