For simplicity of understanding the code
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
can be broken down to the following lines :
var date = "" ;
if(now.getDate()<10) {
date = "0";
}
date = date + now.getDate();
As we can observe we can reduce the amount of code to be written using the ? operator.