JSFiddle - React, Tailwind, and code Playground
HTML
<label>Initial value:</label>
<span id="first"></span>
<br />
<label>New value:</label>
<span id="second"></span>
CSS
label {
font-weight: bold;
}
JavaScript
Date.prototype.addSeconds = function(seconds) {
this.setSeconds(this.getSeconds() + seconds);
};
var dt = new Date();
document.getElementById("first").innerHTML = dt;
dt.addSeconds(1234);
document.getElementById("second").innerHTML = dt;