Syntax - Tasty Web Development Treats

What's New in Javascript

May 13, 2020
Scott and Wes dive into the latest JavaScript features like Array.flatMap() and Optional Chaining, which streamline coding processes. They humorously compare tech frustrations to everyday mishaps while exploring advanced topics such as BigInt and the Navigator.share API. The discussion also highlights new string methods and the pipeline operator for code clarity. They even touch on practical tools like LogRocket that help track user sessions. Expect insights on web development's evolving landscape alongside personal anecdotes!
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ADVICE

Array.flatMap()

  • Use Array.flatMap() to map over an array and return a flattened array.
  • This avoids nested arrays when returning arrays from the map function.
ADVICE

Array.flat()

  • Use Array.flat() to flatten arrays returned by methods like Object.entries().
  • Passing Infinity to .flat() flattens all nested levels.
ADVICE

Array.fromEntries()

  • Convert arrays to objects using Array.fromEntries().
  • This simplifies the process of turning arrays of key-value pairs into objects, replacing more complex reduce operations.
Get the Snipd Podcast app to discover more snips from this episode
Get the app