結果 : javascript return only when promise is resolved