Skip to content

Instantly share code, notes, and snippets.

@droidjahangir
Created September 15, 2021 05:17
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 droidjahangir/93d5831dba0ab4780c9d638390414888 to your computer and use it in GitHub Desktop.
Save droidjahangir/93d5831dba0ab4780c9d638390414888 to your computer and use it in GitHub Desktop.
// default value added
const add = (a: number, b: number = 1) => a + b;
const printOutputFunc: (a: number | string) => void = (output) =>
console.log(output);
printOutputFunc(add(5));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment