結果 : javascript wait for process to finish