結果 : javascript how to wait for async function to complete