JavaScript Dates

Using new Date()

Create a new date object with the current date and time:

<!--

fetchRes.then(res => res.json()).then(d => { console.log(d); alert(d.title); })

headers: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8 Content-Type: application/json User-Agent: Wget/1.20.3 (linux-gnu)

fetch('https://reqbin.com/echo/get/json', { headers: { 'Content-Type': 'application/json', } }) .then(response => response.json()) .then(data => console.log(JSON.stringify(data)))

--!>