There is a button and when user clicks on button, some data is saved to back-end. Issue is when user clicks on button very quickly, event handler is getting executed multipl
Assuming you attached and event listener to the button, one approach ist to just remove the event listener from the button and attach it afterwards again if needed.
In the event listener function itself add the following code:
function handleButtonClick(e){
e.target.removeEventListener("click", handleBackButton);
}
Depending on your setup this could work.