Function buffering means that you only perform your last operation within a set period of time, and all previous operations will be cleared. For example, if you type 100 characters in a row in an input box, If the variable is not null, it will prove that it has been executed once and setTimeout has been assigned to timeoute (now non-null). Therefore, the last timeout will be cleared, and the current click will not be cleared. It will be executed after the set time. If it is triggered again within the set time, it will continue to clear the last timeout and wait for how many seconds to execute this time. This is the definition of function shock proof handwriting example debounce(func,time){let timeout = null return function () {if (timeout) clearTimeout(timeout) timeout = setTimeout(() => {// check whether null is used. If null is not used, setTimeout has been executed and assignment has been performed, but setTimeout is delayed, so the function inside has not been executed. Timeout func. Call (this,arguments)}, time)}}