Skip to content

Instantly share code, notes, and snippets.

@WesleySmits
Last active October 22, 2022 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WesleySmits/c665cbec02767e4faeee15b91eab66ba to your computer and use it in GitHub Desktop.
Save WesleySmits/c665cbec02767e4faeee15b91eab66ba to your computer and use it in GitHub Desktop.
SingletonExample: Test instance equality
const instance1 = SingletonExample.getInstance();
const instance2 = SingletonExample.getInstance();
console.log(instance1 === instance2); // outputs true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment