3 ms·
If you're using ES6 you may as well use spread and defaults to make it more useful: const $ = (selector, context=document) => [...context.querySelectorAll(sele
by abritinthebay 10y ago
If you're using ES6 you may as well use spread and defaults to make it more useful:
const $ = (selector, context=document) => [...context.querySelectorAll(selector)]