JS — object-oriented language, but it lacks classes, they are replaced by the constructors of objects, so instead of the usual inheritance using classes there is inheritance through prototypes. I.e. an instance of a class inherits its properties and methods, which are in his prototype.
A class constructor (function Obj() {}) — the function which describes the properties and methods of the prototype, so all of them will have access when creating the instance.
\r
In the example, A empty constructor and Obj.method assigns the method to the object, not its prototype, so it will not be inherited in obj = new Obj(). This example does not work.
\r
Example B is correct, here is the method added to the prototype and is inherited by all instances.
\r
Example C is most often used when you want to implement a singleton or namespace, because it is a simple hash without a constructor, it cannot be derived from. This is not actually an object in the OOP sense, but simply an associative array that can contain any data, methods and other objects.
\r
Example D same as example C, only the method property contains a reference to an external function. This example can be used when you need to call some function from an external library.
\r
Example E is correct and is similar to example B, with the difference that the inherited method is defined directly in the constructor rather than using prototype.