結果 : how to make asynchronous function synchronous in javascript