Here, I am calling confirm(param1, param2) method to display an alert Do you want to continue?
confirm(param1, param2)
Do you want to continue?
In this case, if the user clicks OK
OK
There is no check!
confirm(param1, param2); checkcount();
and you want to change your function name to something other than confirm.