func1actually a property on SomeFunctionso you can do
const someClass = new SomeFunction();
someClass.func1()
But you cannot do
const someClass = new SomeFunction();
someClass.func2()
because he is not attached to this class. However, you can still use func2inside your class SomeFunction, but not outside the class.
ES6 provides cleaner syntax to figure this out.
class SomeClass{
func1(){
}
}
Hope this helps
source
share