SitePoint
Blog
Forum
Library
Login
Join Premium
Toggle sidebar
JavaScript: Best Practice
Toggle community discussions
Close
Content
Bookmarks
Preface
JavaScript: Best Practice
Notice of Rights
Notice of Liability
Trademark Notice
About SitePoint
Who Should Read This Book?
Conventions Used
1
The Anatomy of a Modern JavaScript Application
A Note About Node.js
JavaScript ES2015+
Modular Code
Package Management
Build Tools
Application Architecture
Deployment
Conclusion
Clean Code with ES6 Default Parameters & Property Shorthands
ES6 Default Parameters
ES6 Property Shorthands
Conclusion
JavaScript Performance Optimization Tips: An Overview
Setting the Stage
What Exactly is Performant JS Code?
Context is Everything
Parsing, Compiling and Executing
Bundle Sizes are Everything
Conclusion
JavaScript Design Patterns: The Singleton
Explaining ES6
What Is a Singleton
The Old Way of Creating a Singleton in JavaScript
The New Way(s)
Conclusion
JavaScript Object Creation: Patterns and Best Practices
Object Literals
Factory Functions
Prototype Chains
ES5 Classes
ES6 Classes
Comparison
Conclusion
Best Practices for Using Modern JavaScript Syntax
Something Solid to Cling To
A Spoonful of Syntactic Sugar
When Your const Isn’t Consistent
Limiting the Scope of the Function
Understand What You’re Getting
Flow Control in Modern JS: Callbacks to Promises to Async/Await
Single-thread Processing
Going Asynchronous with Callbacks
Promises
Async/Await
JavaScript Journey
JavaScript’s New Private Class Fields, and How to Use Them
ES6 Class Basics
Getters and Setters
Child or Sub-Classes
Static Methods and Properties
ESnext Class Fields
Immediate Benefit: Cleaner React Code!
Using Class Fields Today
Class Fields: an Improvement?
Open text modal
Community Questions
Close