array = []
array << true ? "O" : "X"
i did expect to ["O"]
.
but array
is [true]
and now i use push
array.push(true ? "O" : "X")
then result is ["O"]
actually true ? "O" : "X"
return to "O"
my assumption was ["O"]
if use <<
and push
both. but it's not.
anybody known why?