JSFiddle - React, Tailwind, and code Playground
HTML
<a href=# id=remove-file>remove</a><br><a href=# id=add-file>add</a>
JavaScript
var no_of_file = 2;
$('#remove-file').click(function() {
no_of_file--;
alert(no_of_file);
});
$('#add-file').click(function() {
no_of_file++;
alert(no_of_file);
});