• @ceremcem, in mentioned post I cover amost to the T what you are looking for: a module that defines a class with method(s) to use JavaScript in an object-oriented way rather than script way: the first - something() function defines the class, and the hello() function a method on the instances of something - instances crated with new something(...), as you state on stackoverflow post. Btw - for the sake of useful convention(s), class names start with a capital letter... ;-).

    The solution can happen even in one file or even in two files. Let's look at each option in a separate post.

About

Avatar for allObjects @allObjects started