3 ms·
If the syntax for what you want to do is slightly more verbose, JavaScript has a concept of functions which allow you to reuse code quite easily: https://devel
by schwartzworld 4y ago
If the syntax for what you want to do is slightly more verbose, JavaScript has a concept of functions which allow you to reuse code quite easily:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid...
- aserafini 4y agoYou don’t even need to write your own functions: the JavaScript ecosystem has the concept of packaging functions and publishing them as useful libraries! https://www.npmjs.com/package/jquery https://www.npmjs.com/package/jquery