結果 : wait for async function to complete javascript