How do I write this peace of Ajax call that is written in jQuery, completely in vanilla JavaScript
What should be converted into vanilla javascript
$.ajax({
type: "DELETE",
url: "/users/delete/" + $(".deleteUser").data('id');
}}
What I think it should be, but the console log gave me the following error message : request is not defined. And I am afraid it would not pick up the id.
request.open("DELETE", "/users/delete/" + this.dataSet('id'));