Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript function

// Named function
function add(x: number, y: number): number {
  return x + y;
}

// Anonymous function
let myAdd = function (x: number, y: number): number {
  return x + y;
};
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #typescript #function
ADD COMMENT
Topic
Name
7+4 =