Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@iamshouvikmitra
Created August 8, 2021 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamshouvikmitra/831adea8aefd9fb0867e18ee05da92e6 to your computer and use it in GitHub Desktop.
Save iamshouvikmitra/831adea8aefd9fb0867e18ee05da92e6 to your computer and use it in GitHub Desktop.
Function Invocation Pattern in Javascript
function blog(title, body) {
this.title = title;
this.body = body;
return "function invcation pattern";
}
var output = blog("My New Blog", "Lorem Ipsum ... ");
console.log("output: ", output); // "function invcation pattern"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment