javascript short date time format code example
Example 1: javascript date format
const d = new Date('2010-08-05')
const ye = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(d)
const mo = new Intl.DateTimeFormat('en', { month: 'short' }).format(d)
const da = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(d)
console.log(`${da}-${mo}-${ye}`)
Example 2: how to tell this x = 12 + 30 when i read it in js
var x = Math.floor(Math.random() * (max - min + 1)) + min;