hoisting/callback/Synchronous/Asynchronous
659 ワード
☄️ Synchronous/Asynchronous Synchronous:コードを指定した順序で実行します.
Execute the code block in order. Asynchronous:コードがいつ実行されるか予測できないコード
It doesn't execute the code block in order.
ex - call back function
あとでもう一度呼んでくれるから呼んで.
☄️ Hoisting
1. javascript is synchronous
BUT Var, function declaration goes up and then rest of the code will be executed.
がんばって
JavaScriptは同期言語です.ブート後、コードは作成した順序で同期して実行されます.
それはハウスティンとは何ですか.var変数と関数宣言は最上位に上昇し、その後コードは1つずつ実行されます.
Execute the code block in order.
It doesn't execute the code block in order.
ex - call back function
console.log('1');
setTimeout(()=> {console.log('2')}, 1000);
console.log('3');
result : 1,3,2あとでもう一度呼んでくれるから呼んで.
☄️ Hoisting
1. javascript is synchronous
BUT Var, function declaration goes up and then rest of the code will be executed.
がんばって
JavaScriptは同期言語です.ブート後、コードは作成した順序で同期して実行されます.
それはハウスティンとは何ですか.var変数と関数宣言は最上位に上昇し、その後コードは1つずつ実行されます.
Reference
この問題について(hoisting/callback/Synchronous/Asynchronous), 我々は、より多くの情報をここで見つけました https://velog.io/@khg04170/JS-hoistingcallbackSynchronous-Asynchronousテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol