<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| function waitAsync(callback, ms) { | |
| setTimeout(callback, ms); // ํน์ ์๊ฐ ์ดํ์ callback ํจ์๊ฐ ์คํ๋๊ฒ๋ ํ๋ ๋ธ๋ผ์ฐ์ ๋ด์ฅ ๊ธฐ๋ฅ์ ๋๋ค | |
| } | |
| function drink(person, coffee) { | |
| console.log(person + '๋ ' + coffee + '๋ฅผ ๋ง์ญ๋๋ค'); | |
| } | |
| function orderCoffeeSync(coffee) { | |
| console.log(coffee + '๊ฐ ์ ์๋์์ต๋๋ค'); |
| function waitSync(ms) { | |
| var start = Date.now(); | |
| var now = start; | |
| while(now - start < ms) { | |
| now = Date.now(); | |
| } | |
| } // ํ์ฌ ์๊ฐ๊ณผ ์์ ์๊ฐ์ ๋น๊ตํ๋ฉฐ ms ๋ฒ์ ๋ด์์ ๋ฌดํ ๋ฃจํ๋ฅผ ๋๋ blocking ํจ์์ ๋๋ค | |
| function drink(person, coffee) { | |
| console.log(person + '๋ ' + coffee + '๋ฅผ ๋ง์ญ๋๋ค'); |