- 2
Ok
Sundays in Switzerland are protected with Quiet Rules which make it illegal to pursue certain activities. Taking the day of the week as input, output to the console "Obey the rules" if it is Sunday. Sample Input Sunday Sample Output Obey the rules
11 Respuestas
+ 7
You have to use '==' operator to compare two variables
+ 2
If the day is not Sunday what will return?
Which programming language you need help?
Where's your attempt?
+ 2
function main() {
var day = readLine();
var rules = 'Obey the rules';
// Your code goes here
if (day == 'Sunday') {
console.log(rules);
}
}
+ 1
thx I got it and I made it harder ghan it actually was
if (day == ‘Sunday’) {console.log(rules);
}
0
issss that a code coach question?
0
yes i guess im a beginner .
0
heres what i did but only worked for one test case
0
unction main() {
var day = readLine();
var rules = 'Obey the rules';
// if day is Sunday: 'Obey the rules'
var day = day
var rules = 'Obey the rules';
if (day = 'Sunday'); {
}
console.log(rules);
0
function main() {
var day = readLine();
var rules = 'Obey the rules';
// Your code goes here
if(day=='Sunday'){
console.log(rules);
}
0
function main() {
var day = readLine();
var rules = 'Obey the rules';
// Your code goes here
if (day == 'Sunday') {
console.log(rules);
}
}
Good Luck
- 1
unction main() {
var day = readLine();
var rules = 'Obey the rules';
// if day is Sunday: 'Obey the rules'
var day = day
var rules = 'Obey the rules';
if (day = 'Sunday'); {
}
console.log(rules);
heres what i did bit only right gor one test case