0

Please what's wrong with my code?

function canIWatch(age) { if (age <= 0) { return "Invalid age."; } else if(age < 6) { return "You are not allowed to watch Deadpool after 6.00pm."; } else if(age < 17) { return "You must be accompanied by a guardian who is 21 or older."; } else if(age < 25) { return "You are allowed to watch Deadpool, right after you show some ID."; } else if(age >= 25) { return "Yay! You can watch Deadpool with no strings attached!"; } else

23rd Mar 2017, 4:40 PM
Okonkwo Clovis Chisom
Okonkwo Clovis Chisom - avatar
3 Answers
0
actually, it's JavaScript. made a mistake posting it here but can u help me
23rd Mar 2017, 5:20 PM
Okonkwo Clovis Chisom
Okonkwo Clovis Chisom - avatar
0
sorry bud, I don't know JS, only python and Java. Keep working at it, you will figure it out
23rd Mar 2017, 5:23 PM
LordHill
LordHill - avatar
0
Unfinished else statement and didn't close the function
23rd Mar 2017, 5:26 PM
LordHill
LordHill - avatar