Offline
Online
Viewers
I'm Live!
Watch Now

Tag: singleton

JavaScript Singleton Pattern

Singletons are quite effective when it comes to needing only a single instance of a class or object instanciated, regardless of when or who creates it. Let’s start by creating a basic class that we will later turn into a singleton: [codesyntax lang=”javascript”] function ValueObject(){ var value = 100; this.getValue = function(){ return value; } […]

Read More

Affiliates