View Single Post
Old 11-24-2012, 04:01 PM   PM User | #16
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,044
Thanks: 197
Thanked 2,412 Times in 2,390 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Google for "Javascript ternary operator".

The ?: operator can be used as a shortcut for an if...else statement.

box is just the assigned name of the passed variable. It could be anything.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is online now   Reply With Quote