Skip to content

Reinerth/JS_simple_ClassExample_private_public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

JS_simple_ClassExample_private_public

The way I understand a class and would recommend to write a class in JavaScript for best readability and use.

My definition of a Class: Group of objects, functions and variables, usually commonly used (intersection).
My definition of an Object: Group of properties and their values (like JSON).

Thus, a so-called "CSS-class" is not a class, but an object, because it is a group of properties.
CSS-functions like "calc" are only the substitute for the "to-be-generated"-values of their properties.

For a clean modular structure with many classes,
the classes should be integrated in a "namespace".
For having all classes in one container and avoiding "namespace-pollution".
You could find here an example:
https://github.com/Reinerth/JS_modulePattern_ClassExample_private_public



Screenhot of the code:
JS_simple_ClassExample_private_public_no_comments






A screenshot of the complete file

with contextual explanation of my understanding of writing JS-code, and the definition of a class.

JS_simple_ClassExample_private_public








About

The way I understand a class and would recommend to write a class in JavaScript for best readability and use.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages