Is there a difference between a constructor function vs a method like so:
class foo {
constructor() {
// A -> Function inside constructor
this.init = () => {
console.log('test');
}
}
// B -> Method
bar() {
console.log('foo');
}
}
I tried this on the babel REPL and tried to grok the code that it compiles but it doesn't make any sense to me ATM: