Simrendrasingh
1 min readJun 15, 2020

--

The singleton can be implemented by another way. In above example, all properties added to instance will be added as as static property to class. Hence they can be manipulated without creating instance of the class.
This can be more appropriate example of singleton class.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Simrendrasingh
Simrendrasingh

Written by Simrendrasingh

Frontend Engineer with more than 10 years of industry experience. Worked with different frontend famework including react, angular, knockouJS, ember etc

Responses (1)

Write a response