結果 : js wait until function returns