x = (year % 100 === 0) ? (year % 400 === 0) : (year % 4 === 0);
alert(x);
hi guys, how can I convert this variable x to if-else statement returning the variable in true or false result?
thanks a lot
year = 2010;
if(year % 100 === 0)
x = (year % 400 === 0);
else
x = (year % 4 === 0);
alert(x);
if(year % 100 === 0)
x = (year % 400 === 0);
else
x = (year % 4 === 0);
alert(x);