troubleshooting Question

How do JavaScript professionals create "classes" -- closure or functions?

Avatar of elepil
elepil asked on
JavaScript
16 Comments3 Solutions153 ViewsLast Modified:
I'm in the transition of changing technologies in my programming career. I come from a classic object-oriented language (Java), and I'm trying to familiarize myself more in JavaScript.

What is the most common practice today by JavaScript developers when they have to create a data object that needs to respect private and public properties and methods? Do they create the object via closure? Or constructor functions?
ASKER CERTIFIED SOLUTION
David S.
Consultant & Challenge Subduer
Join our community to see this answer!
Unlock 3 Answers and 16 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros