結果 : how to make asynchronous call synchronous in javascript