-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexercise2.js
More file actions
28 lines (24 loc) · 806 Bytes
/
exercise2.js
File metadata and controls
28 lines (24 loc) · 806 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
26
27
28
/*
Logical Operators
---------------------------------
This program calls some functions that are either missing or incomplete.
Update the code so that you get the expected result.
*/
function isNegative() {}
/*
DO NOT EDIT BELOW THIS LINE
--------------------------- */
console.log("Is -10 is a negative number?", isNegative(-10));
console.log("Is 5 a negative number?", isNegative(5));
console.log("Is 10 in the range 5-10?", isBetween5and10(10));
console.log("Is Daniel a short name?", isShortName("Daniel"));
console.log("Does Daniel start with 'D'?", startsWithD("Daniel"));
/*
EXPECTED RESULT
---------------
Is -10 is a negative number? true
Is 5 a negative number? false
Is 10 in the range 5-10? true
Is Daniel a short name? true
Does Daniel start with 'D'? true
*/