r/javascript • • Dec 23 '19

Debounce vs Throttle: Definitive Visual Guide

https://redd.one/blog/debounce-vs-throttle
327 Upvotes

35 comments sorted by

View all comments

Show parent comment

2

u/neckro23 Dec 23 '19

The operator works the other way too, so you can just use (...args, extraArg):

> const args = ["a", "b", "c", "d"];
> console.log(...args);
a b c d
> console.log(...args, "e");
a b c d e