3 ms·
Object.assign (or equivalent with libraires like jQuery or Underscore or what have you) is very much modern code. Hell, Object.assign is ES6.
by masklinn 12y ago
Object.assign (or equivalent with libraires like jQuery or Underscore or what have you) is very much modern code. Hell, Object.assign is ES6.
- eldude 12y agoYou misunderstand. Object.assign is as available today as is `typeof foo.bar === 'undefined'` or `_.defaults(...)`. Yet I doubt even the majority of modern code always uses them consistently because `if (foo.bar)` or `foo.bar = foo.bar || 1234` is much simpler and much faster.