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
- react hook
- descendingOrder
- codewar
- codewars
- manifest.json
- DB2
- react
- type
- TypeScript
- java api
- Debug
- IBM
- custom hook
- isSquare
- JDBC
- TABLESPACE
- useEffect
Archives
- Today
- Total
taesik
closure 1 - return result of function /return function 본문
Concepts/TypeScript
closure 1 - return result of function /return function
taesikk 2022. 1. 23. 11:48const out = function () {
let number = 65;
let internal =function(){
let char_ = String.fromCharCode(++number);
return `${char_}:${number}`;
};
return internal;
}
This return Function.
console.log(out());
console.log(out());
result
A:65
B:66
const out = function () {
let number = 65;
let internal =function(){
let char_ = String.fromCharCode(++number);
return `${char_}:${number}`;
};
return internal();
}
This return result of Function.
console.log(out());
console.log(out());
result
A;65
A:65
'Concepts > TypeScript' 카테고리의 다른 글
| Count instance in object (0) | 2022.04.06 |
|---|---|
| curring (0) | 2022.01.23 |
| increase 1 per 1second using closure function (0) | 2022.01.23 |
| Utility Type (0) | 2021.12.28 |