<script>
const profile = async function(end, idx) {
const userId = await new Promise(res=> $.post('./StatementSimpleMatch/zz_await_promise', idx, res));
end(userId);
};
profile(console.log, 'ABC');
</script>
'프로그래밍 > Js' 카테고리의 다른 글
JavaScript Lexical Grammar (0) | 2021.10.21 |
---|---|
ES6+ 2차원배열 foreach (0) | 2018.11.23 |
ES6+ html parser 재귀함수 (0) | 2018.11.23 |
ES6+ SYNC, ASYNC (block, non-block) (0) | 2018.11.21 |
ES6+ blocking 과 non-blicking (time slice) (0) | 2018.11.21 |