65async function postMsg() {
66 if((Date.now() - last_called_postMsg) < 100) {
67 createModal("slow down there")
68 debugger; 69 return;
70 }
71 last_called_postMsg = Date.now()
70 function postMsg() {
71 if((Date.now() - last_called_postMsg) < 100) {
72 createModal("slow down there")
73 debugger; 74 return;
75 }
76 last_called_postMsg = Date.now()
The debugger
statement is used to tell the JavaScript environment to stop execution and start up a debugger at the current point in the code.
Production code should not contain debugger
statements, as they will cause the browser to stop executing code and open the console debugger.
function isTruthy(x) {
debugger;
return Boolean(x);
}
function isTruthy(x) {
return Boolean(x);
}