function checkPermissionDecorator(f) {
  return function() {
    if (user.isAdmin()) {
        f();
    } else {
        alert('Not an admin yet');
    }
  };
}
save = checkPermissionDecorator(save);function doublingDecorator(f) {
  return function() {
    return 2*f.apply(this, arguments)
  } 
}
function sum(a, b) {
  return a + b
};
var doubleSum = doublingDecorator(sum);
alert(doubleSum(1,2));const literal = {};
const dog = Object.defineProperties(literal, {
  name: {
    value: 'Doug',
    writable: true,
    enumerable: true,
    configurable: true
  },
  legs: {
    value: 4,
    writable: true,
    enumerable: true,
    configurable: true
  }
});function readonly (target, key, descriptor) {
  descriptor.writable = false;
  return descriptor;
}function readonly (key) {
	return function (target, key, descriptor) {
		descriptor.writable = false;
		return descriptor;
	}	
}