Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- java api
- codewar
- JDBC
- TypeScript
- descendingOrder
- isSquare
- TABLESPACE
- IBM
- manifest.json
- custom hook
- DB2
- react hook
- useEffect
- Debug
- codewars
- type
- react
Archives
- Today
- Total
taesik
curring 본문
const sum1=(x:number,y:number)=>{
return x+y;
}
const sum=(x:number) =>{
return (y:number)=>{
return x+y;
}
}
const sum2= sum(3);
console.log(sum2(4));
console.log(sum(3)(4));
curring function :
only use 1 parameter and return next function
'Concepts > TypeScript' 카테고리의 다른 글
| Count instance in object (0) | 2022.04.06 |
|---|---|
| increase 1 per 1second using closure function (0) | 2022.01.23 |
| closure 1 - return result of function /return function (0) | 2022.01.23 |
| Utility Type (0) | 2021.12.28 |