Decoradores em JavaScript
let variable = function(color) {
return function (target) {
target.property = color;
}
};
// The value is passed in the decorator
@variable('GFG is Green')
console.log(GFG.property);
nisarg ahir