bind(), call(), and apply()
Why is apply() used in this debounce implementation?
function debounce(func, wait) {
let timeout;
return function executedFunction() {
const context = this;
const args = arguments;
clearTimeout(timeout);
timeout = setTimeout(function() {
func.apply(context, args);
}, wait);
};
}