結果 : declare variable inside if statement javascript