Created
January 21, 2024 05:47
-
-
Save yorkfx/1bc7cce25233dcfb2e0d5e934cc45952 to your computer and use it in GitHub Desktop.
Fecha fin de semana
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Desafio 2 | |
const diaSemana = ["Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado"]; | |
const d = new Date(); | |
let dia = diaSemana[d.getDay()]; | |
if(diaSemana == "Sabado" || diaSemana == "Domingo"){ | |
console.log(`Si es fin de semana, hoy es ${dia}`); | |
} | |
else{ | |
console.log(`No es fin de semana, hoy es ${dia}`) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment