Skip to content

Commit 73ce10d

Browse files
committed
It's a js, not an OOP
1 parent 01bb1e7 commit 73ce10d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

JavaScript/6-js.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
3+
// But what a bullshit?
4+
// It's a JavaScript, not an OOP
5+
// We can just use {}
6+
7+
const singleton = {};
8+
9+
// Usage
10+
11+
console.assert(singleton === singleton);
12+
console.log('instances are equal');

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy