Problem whit my code(Im just starting)

juanfe

Juan-Fe

Posted on July 25, 2019

Problem whit my code(Im just starting)

Visual Studio says me I have a problem whit my code, Im just starting whit Javascript and I don't know where is the problem.
Code:

DOCTYPE html
html
head
meta charset="utf-8"
title Functions/title
<meta name=" Functions" content="Functions whit days"
/head
body
p id="output"/p
img id="face"
Script type="text/javascript"
function esFinDeSemana(){
const día = new Date().getDay ();
if (dia 0 || dia === 6){
return true;
}
else{
return false;
}
let ValorSrc;
if (esFinDeSemana()){
ValorSrc = 'CaritaFeliz.png'
else{
ValorSrc CaritaTriste.png
}
document.getElementById(' face' ).src = ValorSrc;
/script
/body
/html

💖 💪 🙅 🚩
juanfe
Juan-Fe

Posted on July 25, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related