結果 : how to avoid settimeout in javascript