Relative Content

Tag Archive for javascriptnode.jsclassmethods

How I return something from class methods?

In constructor function I returned this.ar, and in push method I returned item, but the problem is when I return from constructor and push both, only the constructor returns, and push returns 1,2,3… is there any solution?
I want when user console the class then print the array — (this.ar).
Note: IIFE not working in class object.