Skip to Main Content
Professional JavaScript
book

Professional JavaScript

by Hugo Di Francesco, Siyuan Gao, Vinicius Isola, Philip Kirkbride
September 2019
Intermediate to advanced content levelIntermediate to advanced
664 pages
11h 42m
English
Packt Publishing
Content preview from Professional JavaScript

Chapter 5

Modular JavaScript

Learning Objectives

By the end of this chapter, you will be able to:

  • Import and export functions and objects in JavaScript for code reusability
  • Use JavaScript ES6 classes to reduce code complexity
  • Implement object-oriented programming concepts in JavaScript
  • Create private variables for an object using encapsulation
  • Convert ES6 to generic JavaScript using Babel
  • Create and publish an npm package in JavaScript
  • Combine modules using composability and strategies to create higher-level modules

In this chapter, we will learn about the importance of reusable code in modern JavaScript and how ES6 has introduced syntax for easily creating and using modules. We will create a JavaScript module that can be imported and ...

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.
Start your free trial

You might also like

Professional JavaScript for Web Developers, 4th Edition

Professional JavaScript for Web Developers, 4th Edition

Matt Frisbie
Speaking JavaScript

Speaking JavaScript

Axel Rauschmayer
JavaScript

JavaScript

T. J. Crowder

Publisher Resources

ISBN: 9781838820213Other