Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

date object js

var today = new Date();
var year = today.getFullYear();

var element = document.getElementById('main');
element.innerHTML = `<p>Today's date is ${today}</p>`;
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #date #object #js
ADD COMMENT
Topic
Name
1+8 =