0
JavaScript quietRules challenge
function main() { var dayofWeek = readLine(); var quietRules = 'mowing, hanging out laundry, washing a car, recycling bottles are not allowed'; if (dayofWeek) { console.log('mowing, hanging out laundry, washing a car, recycling bottles are not allowed'); } //I keep getting it wrong because I’m not suppose to output anything if the day of week isn’t Sunday! Help please!
2 ответов
+ 2
What is if(dayofWeek) suppose to do? Is it checking that if the user input (dayofWeek)!="Sunday" or what? anyway that's something basic you should know about before even getting started with a language like node ,
By the way read on how to take input in node
https://nodejs.org/api/readline.html
0
i got it thanks!
function main() {
var dayofWeek = readLine();
var quietRules = 'mowing, hanging out laundry, washing a car, recycling bottles are not allowed';
if (dayofWeek == 'Sunday') {
console.log('mowing, hanging out laundry, washing a car, recycling bottles are not allowed');
}