Sets the date's seconds. Setting the seconds to a number greater than 59 also increments the minutes.
var myDate = new Date();
/*w w w .j av a 2s .c o m*/
myDate.setSeconds(21);
console.log(myDate.toString());
The code above generates the following result.