I want to use destructuring with the "this" keyword inside function/class.
I have this code:
class Test {
constructor( options ) {
let {title, content} = options;
}
}
The output is (i am using babel js):
var _options = options;
var title = _options.title;
var content = _options.content;
How can i achieve this output:
this._options = options;
this.title = _options.title;
this.content = _options.content;