can someone please explain the role of the ? in this function
function add() {
h1.textContent = (hours ? (hours > 9 ? hours : "0" + hours) : "00") + ":" + (minutes ? (minutes > 9 ? minutes : "0" + minutes) : "00") + ":" + (seconds > 9 ? seconds : "0" + seconds);
}
I read that the ? works as follows varname = (condition) ? value1:value2. If the condition evaluates to true the variable becomes equal to value1 else value2.
Which I understand. But i'm getting confused by the nested ? in the above and how to parse it...