-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLeoOscars.js
More file actions
25 lines (21 loc) · 733 Bytes
/
LeoOscars.js
File metadata and controls
25 lines (21 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*Instructions:
You have to write a function that describe Leo:
function leo(oscar) {
}
if oscar was (integer) 88, you have to return "Leo finally won the oscar! Leo is happy".
if oscar was 86, you have to return "Not even for Wolf of wallstreet?!"
if it was not 88 or 86 (and below 88) you should return "When will you give Leo an Oscar?"
if it was over 88 you should return "Leo got one already!"
*/
// Answer
function leo(oscar) {
if (oscar === 88) {
return "Leo finally won the oscar! Leo is happy";
} else if (oscar === 86) {
return "Not even for Wolf of wallstreet?!";
} else if (oscar < 88) {
return "When will you give Leo an Oscar?";
} else if (oscar > 88) {
return "Leo got one already!";
}
}