getSecondsbeginnerconst d = new Date(2024, 0, 15, 12, 30, 45)
d.getSeconds() // β 45
// returns 0β59Use getSeconds() to retrieve the seconds component (0β59) of a Date object in local time.
Returns the seconds (0β59) in local time.
Challenge: Verify that new Date(2024, 0, 15, 12, 30, 45).getSeconds() returns 45.