|
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.
|