結果 : javascript wait until first function is done