Skip to content

Instantly share code, notes, and snippets.

@mariucagl
Created November 21, 2012 10:55
Show Gist options
  • Save mariucagl/4124276 to your computer and use it in GitHub Desktop.
Save mariucagl/4124276 to your computer and use it in GitHub Desktop.
Función que te indica si es jueves o no es jueves
var dia = new Date().getDay();
undefined
dia
4
function semana(d){
if(d == 4){
console.log("hoy es jueves cariño");
} else{
console.log("hoy no es jueves cariño, lo siento");
}
}
undefined
semana(5)
hoy no es jueves cariño, lo siento
undefined
semana(4)
hoy es jueves cariño
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment