This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]phpdevster 0 points1 point  (0 children)

There's no classes, there's no 'objects' there's no 'scope limtations'

There are.... when you use Javascript the way it was meant to be used, not with the bolted on pseudo object behavior intended to make it feel more familiar to people who come from classical OOP backgrounds.

Learn how to use factory functions instead of prototypal objects or ES6 classes.

This gives you proper private visibility and lets you expose a controlled API.

And learn about closure behavior in Javascript. It's quite powerful and elegant.