結果 : convert async function to sync javascript