how to remove attrivusre with jquery

JavaScript
$("button").click(() => {
  $("div").removeAttr("id"); // <div id='12' class='nice'></div> --> <div class='nice'></div>
});$("button").click(function(){
  $("p").removeAttr("style");
 });
  
 
Source

Also in JavaScript: