Samier Saeed walks you through the best way to implement a singleton in JavaScript and examines how that has evolved with the rise of ES6.
Tag: closures
JavaScript Design Patterns: The Singleton
Improve Your Swift Closures with Result
Read Improve Your Swift Closures with Result and learn Mobile with SitePoint. Our web development and design tutorials, courses, and books will teach you HTML, CSS, JavaScript, PHP, Python, and more.
The Final Steps to Mastering JavaScript’s “this” Keyword
Completing his look at JavaScript's 'this' keyword, Ivaylo Gerchev examines how to use 'this' in callbacks and closures, as well as lexical binding in ES6.
Demystifying JavaScript Closures, Callbacks and IIFEs
Ivaylo Gerchev examines three of the most important and heavily-used concepts in modern JavaScript development — closures, callbacks and IIFEs
Implementing Memoization in JavaScript
Colin Ihrig explains the concept of memoization, which can potentially increase your program's performance by caching the results of previous function calls