let now = new Date();
let desde1970 = new Date(1000 * 60 * 60 * 24 * 365 * 10);
let deCadena = new Date("2024-12-01 10:24:30");
let desglosado = new Date(2023, 0, 44, 17, 15, 20);
console.log(now);
console.log(desde1970);
console.log(deCadena);
console.log(desglosado);
console.log(desglosado.toDateString());
console.log(desglosado.toLocaleString());
console.log(desglosado.toLocaleDateString());
// Todas las fechas de 2024
for(let i=1;i<=365;i++){
console.log(new Date(2024,0,i));
}
console.log(now.getFullYear(),now.getMonth(), now.getDate(), now.getHours(),now.getMinutes(),now.getSeconds(), now.getMilliseconds());
console.log(now.getDay(),now.getTime());
let inicio=new Date().getTime();
console.log(inicio)
for(let i=0;i<100000000;i++){
let a=2**i;
}
let fin=new Date().getTime();
console.log(fin)
console.log(fin-inicio)
Chuleta fechas en JS