I've been studying computed properties of Vues.js that these computed properties use getters
and setters
too, and studying on get I fell into this sample code on the mozilla :
var expr = "foo";
var obj = {
get [expr]() {
return "bar";
}
};
console.log(obj.foo); // bar
That's when the question came to me:
- Get is only used to work with the value of the variable while keeping the original value of the same or would you have any other application?