I am learning airbnb coding style. Why use atom.value
instead of this.value
in the following codes (section 3.3)? any benefits?
// good
const atom = {
value: 1,
addValue(value) {
return atom.value + value;
},
};
Update
The following code is an example of its benefits. Any other benefits?
const bias = atom.addValue;
console.log(bias(11))
Thanks