small medium large xlarge

Simplifying JavaScript: Writing Modern JavaScript with ES5, ES6, and Beyond

by

Cover image for Simplifying JavaScript

Simplifying JavaScript

Writing Modern JavaScript with ES5, ES6, and Beyond

by

The best modern JavaScript is simple, readable, and predictable. Learn to write modern JavaScript not by memorizing a list of new syntax, but with practical examples of how syntax changes can make code more expressive. Starting from variable declarations that communicate intention clearly, see how modern principles can improve all parts of code. Incorporate ideas with curried functions, array methods, classes, and more to create code that does more with less while yielding fewer bugs.

Customer Reviews

You should probably jot down each Tip from this book on Post-It notes and plaster them all over your desk area. These simple, practical bits of advice will have a profound effect on simplifying your JavaScript.

- Kyle Simpson

Author of "You Don’t Know JS" and Open Web Evangelist

Joe provides a clear, organized path to mastering key JavaScript concepts. This isn’t a boring textbook. It’s a playbook filled with practical, real-world approaches to writing modular, maintainable, and modern JavaScript.

- Cory House

Pluralsight Author and International Speaker and Consultant

This book is great for experienced developers whose past experience with Java- Script has left a bad taste in their mouth. Modern JavaScript, when understood through this book, is sure to turn former critics into advocates.

New developers will also benefit from thorough explanations that are in layman’s terms—not the overly technical jargon that typically acts as a barrier to entry with many technical books.

- Sara Heins

International Speaker, Django Girls Kansas City Program Director, and Lead Web Developer, Big 6 Media

This book is ideal for beginners as well as intermediate and beyond.

- Shreerang Patwardhan

Author of "Mastering jQuery Mobile," Senior Software Engineer, Macy's, Inc.

I would definitely recommend this book to others on my team. I believe that most, if not all, of my team could benefit from reading this book.

- Nick McGinness

Software Engineer, Direct Supply

See All Reviews

Choose Your Format(s)

  • $49.95 In Stock

    Save $15.95 on the combo pack.

  • $39.95 In Stock
  • $25.95 In Stock
  • Ebooks are DRM free.

  • Ebook delivery options.

What You Need

For the best experience, have the latest version of Node installed (at least version 7). You can test most examples in the console of Chrome or other modern web browser.

If you’d like to run the tests, you’ll also need to install the latest version of Node Package Manager (npm).

Contents & Extracts

  • Introduction
    • How To Use This Book
    • Who This Book is For
    • Online Resources
  • Signal Intention with Variable Assignment
    • Tip 1. Signal Unchanging Values with const
    • Tip 2. Reduce Scope Conflicts with let and const
    • Tip 3. Isolate Information with Block Scoped Variables
    • Tip 4. Convert Variables to Readable Strings with Template Literals
  • Manage Data Collections with Arrays
    • Tip 5. Create Flexible Collections with Arrays
    • Tip 6. Check Existence in an Array with Includes()
    • Tip 7. Mold Arrays with the Spread Operator
    • Tip 8. Avoid Push Mutations with the Spread Operator
    • Tip 9. Avoid Sort Confusion with the Spread Operator
  • Maximize Code Clarity with Special Collections
    • Tip 10. Use Objects for Static Key-Value Lookups 41
    • Tip 11. Create Objects Without Mutations Using Object.assign()
    • Tip 12. Update Information with Object Spread excerpt
    • Tip 13. Update Key-Value Data Clearly with Maps
    • Tip 14. Iterate Over Key-Value Data with Map and the Spread Operator
    • Tip 15. Create Maps Without Side Effects
    • Tip 16. Keep Unique Values with Set
  • Write Clear Conditionals
    • Tip 17. Shorten Conditionals with Falsy Values
    • Tip 18. Check Data Quickly with the Ternary Operator
    • Tip 19. Maximize Efficiency with Short Circuiting Simplify Loops
    • Tip 20. Simplify Looping with Arrow Functions
    • Tip 21. Write Shorter Loops with Array Methods
    • Tip 22. Create Arrays of a Similar Size with map()
    • Tip 23. Pull Out Subsets of Data with filter() and find()
    • Tip 24. Apply Consistent Actions with forEach()
    • Tip 25. Combine Methods with Chaining
    • Tip 26. Transform Array Data with reduce()
    • Tip 27. Reduce Loop Clutter with for…in and for…each
  • Clean Up Parameters and Return Statements
    • Tip 28. Create Default Parameters
    • Tip 29. Access Object Properties with Destructuring
    • Tip 30. Simplify Key-Value Assignment
    • Tip 31. Pass a Variable Number of Arguments with the Rest Operator
  • Build Flexible Functions
    • Tip 32. Write Functions for Testability
    • Tip 33. Reduce Complexity with Arrow Functions excerpt
    • Tip 34. Maintain Single Responsibility Parameters with Partially Applied Functions
    • Tip 35. Combine Currying and Array Methods for Partial Application
    • Tip 36. Prevent Context Confusion with Arrow Functions
  • Keep Interfaces Clear with Classes
    • Tip 37. Build Readable Classes
    • Tip 38. Share Methods with Inheritance
    • Tip 39. Extend Existing Prototypes with Class
    • Tip 40. Simplify Interfaces with get and set
    • Tip 41. Create Iterable Properties with Generators excerpt
    • Tip 42. Resolve Context Problems with Bind()
  • Access External Data
    • Tip 43. Retrieve Data Asynchronously with Promises
    • Tip 44. Create Clean Functions with Async/Await
    • Tip 45. Make Simple AJAX Calls with Fetch
    • Tip 46. Maintain State Over Time with LocalStorage
  • Gather Related Files with Component Architecture
    • Tip 47. Isolate Functionality with Import and Export
    • Tip 48. Leverage Community Knowledge with npm
    • Tip 49. Build Applications with Component Architecture
    • Tip 50. Use Build Tools to Combine Components
    • Tip 51. Leverage CSS for Animations
  • Bibliography
  • Index

Author

Joe Morgan is a developer out of Lawrence, KS. Joe was born without any code knowledge at all, and since then, he’s been trying to learn a little more every day. A long-time JavaScript fan, he’s enjoying the JavaScript renaissance that has made it more beautiful than ever. He loves writing and speaking on JavaScript and craftsmanship.

Upcoming Author Events