20 JavaScript Array and Object Methods to make you a better developer
source link: https://syntax.fm/show/043/20-javascript-array-and-object-methods-to-make-you-a-better-developer
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Apr 25th, 2018
20 JavaScript Array and Object Methods to make you a better developer
👇 Download Show✏️ Edit Show NotesWes and Scott rattle through ~20 different Object and Array Methods that will make you a better JavaScript developer.
Freshbooks - Sponsor
This is episode Wes mentions the free book Breaking The Time Barrier. Get a 30 day free trial of Freshbooks at freshbooks.com/syntax.
Netlify — Sponsor
Netlify is the best way to deploy and host a front-end website. All the features developers need right out of the box: Global CDN, Continuous Deployment, one click HTTPS and more. Hit up netlify.com/syntax for more info.
They are also hiring! netlify.com/careers
Show Notes
For the docs for all these, just google mdn
and the method you are looking for 😃
- Why are these great?
- They are chainable
- Immutable
- .filter()
- Truthy or Falsy
- .map()
10:00
- .reduce() - returns any shape! filter, create a new shape, add up numbers...
14:30
- .forEach()
- Side effects
16:00
- .some()
- can be used as a short circuit forEach
25:00
- .every()
- .includes() (why not contains?)
26:00
- Array.from()
- Array.from() takes a secondary map arg
- Array.of()
29:00
- Object.values()
- Object.keys()
- Object.entries()
32:00
- Array spread - converts iterable to array
- Array spread - Concats arrays
- Array Spread + Slice. Don't splice - remove an item from an array.
34:00
- Object Spread
37:00
- Function Rest
39:00
- Object.freeze()
40:00
- Object.seal()
41:00
- Object.assign() - no longer needed because you can object spread
- Reference vs Copy in JavaScript
×SICK×PICKS×
Shameless Plugs
Tweet us your tasty treats!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK