JSFiddle - React, Tailwind, and code Playground

by Dedi Wibisono

HTML

<button class="click">haha</button>

JavaScript

var count = 0;
$(".click").click(function(){
	if (count >=3) {
   	$(this).hide()
  } else {
   count ++
  }
})