Example of an empy class?

Can someone post me a proper example of an empty class in Javascript with an initialize or constructor (if supported)? I found several ways to make classes and they are all a bit weird.

Is the code below the proper way?

Code:
function MyClass() { this.initialize.apply(this, arguments); }//MyClass.prototype = Object.create(Sprite_Base.prototype); // What is this... subclassing?MyClass.prototype.constructor = MyClass;MyClass.prototype.initialize = function(args){   // This function should be automatically called upon object creation   // do stuff here   console.log(args);};
Code:
var test = new MyClass('some argument')
JavaScript itself is "a bit weird" to put it mildly, if you're used to strictly typed languages like Java.  It never should have been called "JavaScript" Something like "Webscript" or at least not using "Java" in the name would have been less confusing.

Yes, the commented out line is one way to subclass.  Basically you create a new prototype instance based on an existing prototype or Object.

The method you posted will work.  There is no one "proper" way to create a new class though.  There are several ways.  In essence, every object (and, functions ARE objects) has a Prototype.  

I highly recommend going over to codeacademy.com and taking their Javascript online course.  It's free and was a huge help for me to start understanding how Javascript works.

And expect really strange things when writing your first JS plug-in or program, like trying "for a in array_object" This does NOT iterate like you think it does if you're used to Java.  It iterates over EVERY non-hidden attribute in the array, including "equals" (the function), the "length" attribute and the actual array members.  So you get strings like "0" and "1" instead of the actual array MEMBERS like you expect...

Best of luck!
If you're not subclassing, there is no need to set the constructor.
var Something = function(){}


Something.prototype.constructor = function() {}


// or


class Something {}

Original thread: https://forums.rpgmakerweb.com/threads/example-of-an-empy-class.50852/