2 ms·
It's worth mentioning that the ES6 array spread operator provides similar functionality: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Oper
by baddox 11y ago
It's worth mentioning that the ES6 array spread operator provides similar functionality:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#A_more_powerful_array_literal https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
The object spread operator (proposed in ES7) is essentially syntactic sugar for Object.assign:
https://github.com/sebmarkbage/ecmascript-rest-spread https://github.com/sebmarkbage/ecmascript-rest-spread
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
I've even used jQuery's extend in legacy projects:
https://api.jquery.com/jquery.extend/ https://api.jquery.com/jquery.extend/