Skip to content

Instantly share code, notes, and snippets.

@suhailgupta03
Created May 16, 2023 16:02
Show Gist options
  • Select an option

  • Save suhailgupta03/cbe520d07b1f8b84545cb52770d7a46e to your computer and use it in GitHub Desktop.

Select an option

Save suhailgupta03/cbe520d07b1f8b84545cb52770d7a46e to your computer and use it in GitHub Desktop.
var zz = function(x, y) {
return x + y;
} // Arjun created this general definition (anonymous) for other
// developers
var addTwoNumbers = zz; // Aditi says, that I will start
// using zz to add two numbers, but before I will give it
// a proper name
var result = addTwoNumbers(1, 2);
console.log(result);
var concatenateTwoStrings = zz; // Aditya decided to
// use Arjun's definition and give it a proper name
// for his own use case
var concatResult = concatenateTwoStrings("foo", "bar");
console.log(concatResult);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment