I know that in php 5.3 instead of using this redundant ternary operator syntax:
startingNum = startingNum ? startingNum : 1
...we can use a shorthand syntax for our ternary operators where applicable:
startingNum = startingNum ?: 1
And I know about the ternary operator in javascript:
startingNum = startingNum ? startingNum : 1
...but is there a shorthand?
Thanks guys!
Something like that what you're looking for, where it defaults if undefined?
By the way, this works for a lot of scenarios, including objects: