結果 : for loop with if else statement javascript