There is a table with data and an array. Data from this table is stored in an array. How can I remove this object from an array by clicking on the "delete" button?
var contacts = [{name:"Mark",surname:"Otto",username:"@mdo"}, {name:"Jacob",surname:"Thornton",username:"@fat"}, {name:"Larry",surname:"the Bird",username:"@twitter"}] <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"> <table class="table table-striped"> <thead> <tr> <th scope="col">#</th> <th scope="col">ΠΠΌΡ</th> <th scope="col">Π€Π°ΠΌΠΈΠ»ΠΈΡ</th> <th scope="col">Username</th> <th scope="col">ΠΡΠΈΡΡΠΈΡΡ</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> <td>@mdo</td> <td><button>ΡΠ΄Π°Π»ΠΈΡΡ</button></td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> <td><button>ΡΠ΄Π°Π»ΠΈΡΡ</button></td> </tr> <tr> <th scope="row">3</th> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> <td><button>ΡΠ΄Π°Π»ΠΈΡΡ</button></td> </tr> </tbody> </table>