typescript arrow function

Solutions on MaxInterview for typescript arrow function by the best coders in the world

showing results for - "typescript arrow function"
Wilbert
01 May 2019
1const foo = <T extends unknown>(x: T) => x;
Melvyn
11 Jun 2019
1//prototype 
2const/let <FunctionName> = (params: type) :<ReturnType> =>{
3  ....
4};
5
6const PrintName =  (name: string): string => {
7  return console.log("my name is " , name) ;
8}
Michela
23 Jun 2020
1let sum = (x: number, y: number): number => {
2    return x + y;
3}
4
5sum(10, 20); //returns 30
Alex
05 Jun 2016
1// ES6: With arrow function  
2var getResult = (username: string, points: number): string => {  
3  return `${ username } scored ${ points } points!`;  
4};
5
6getResult('joyous jackal' , 100);
similar questions
queries leading to this page
typescript arrow function