From: Robert Klemme Date: 2005-06-02T19:50:33+09:00 Subject: Re: ternary operator confusion Marcel Molina Jr. wrote: > On Thu, Jun 02, 2005 at 01:40:23AM +0900, Phrogz wrote: >> true ? a.push(1) : a.push(2) > > i suspect this could have been just a contrived example but you could > also do: > > a.push true ? 1 : 2 In fact I'd say this is the preferred approach in this case. Also use a = true ? 1 : 2 Both have less redundancy compared to the original code. Kind regards robert