It's the sample code of what I was doing. My intention was to receive an object within a callback but ended up as undefined.
Code:
const a = message => console.log(message);
const b = mes => a(mes);
const c = cb => cb();
const greeting = () => c(() => b("good morning"));
console.log(greeting());
Output: "good morning" undefined