Skip to content

Instantly share code, notes, and snippets.

@casprwang
Created January 5, 2017 21:16
Show Gist options
  • Save casprwang/1d5b346c6ec9b280a8e0449abe460382 to your computer and use it in GitHub Desktop.
Save casprwang/1d5b346c6ec9b280a8e0449abe460382 to your computer and use it in GitHub Desktop.
pass val to an function inside of an object
// greet();
// a();
const a = function () {
console.log('h1');
};
function greet() {
console.log('h2');
}
const log = a => console.log(a);
log({
greeting: 'hi'
});
const curry = x => ({
logger: () => console.log(x)
});
curry('hi').logger();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment