I have a simple program like:
<div onclick="handleClick(event)" ondblclick="handleDoubleClick(event)">
Hellooww world
</div>
<script>
var a = false
function handleClick(e) {
if(a) {
a = false
console.log("Hellooww", a)
}else{
a = true
console.log("Hellooww", a)
}
}
function handleDoubleClick(e) {
console.log("world")
}
</script>
Here on single click it sets the value of a to true of false.. But when its double click it perfomrs both single click and double click
How can I check only for single click and double click