Skip to content

Instantly share code, notes, and snippets.

@sakshstore
Created August 10, 2023 03:39
Show Gist options
  • Save sakshstore/48234d064c798b7890f087fe7a6a3629 to your computer and use it in GitHub Desktop.
Save sakshstore/48234d064c798b7890f087fe7a6a3629 to your computer and use it in GitHub Desktop.
For single expression functions, you can use arrow functions with implicit return for more concise code.
// Longhand
const multiply = (a, b) => {
return a * b;
};
// Shorthand
const multiply = (a, b) => a * b;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment