function magic(f) {
return f();
}
let date = new Date();
magic(date.getMonth);
magic(date.getDay)
function magic(f) {
return f();
}
let obj = {
some: function () {
return 1;
}
};
magic(obj.some);
class b {
a = 123;
func = () => {
console.log(this.a)
}
}
function func(f) {
return f()
}
func(new b().func) // 123