Wrapping Up
Template literals and destructuring greatly reduce the noise in code and are among the most charming features in modern JavaScript. Thanks to template literals, we’ll have no more clutter from multiple lines of +s to concatenate string expressions. Furthermore, tagged templates offer the ability to process literals to implement custom logic. Object literals reduce the ceremony around creating objects, and powerful destructuring makes extracting data from arrays and objects pretty darn easy. Furthermore, mixing destructuring with the rest operator makes the code for copying objects extensible to adding and removing properties.
In the next chapter, you’ll learn about all the improvements in JavaScript to do OO programming.
Exercises ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access