My code outputs every day besides sunday. Why? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

My code outputs every day besides sunday. Why?

function main() { var dayofWeek = readLine(); var quietRules = 'mowing, hanging out laundry, washing a car, recycling bottles are not allowed' if (dayofWeek == quietRules ) { alert('mowing, hanging out laundry, washing a car, recycling bottles are not allowed'); }}

27th Nov 2020, 10:31 PM
Emmanuel Riano
Emmanuel Riano - avatar
2 Respostas
+ 1
if(dayofWeek == "Sunday"){ console.log(quietRules);}
27th Nov 2020, 11:02 PM
Bahhaāµ£
Bahhaāµ£ - avatar
+ 1
I put that but forgot the quotation marks lol thanks
27th Nov 2020, 11:05 PM
Emmanuel Riano
Emmanuel Riano - avatar