Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

Commit ff10a7f

Browse files
author
Sally McGrath
committed
fix predicates test
and swap order of exercise so predicates come after logical operators resolves CodeYourFuture/syllabus#233
1 parent c17bff6 commit ff10a7f

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Predicates
33
---------------------------------
4-
Write a predicate to predicates
4+
Write two predicate functions
55
The variables should have values that match the expected results.
66
*/
77

@@ -14,17 +14,17 @@ function isBetweenZeroAnd10(number) {}
1414
/*
1515
DO NOT EDIT BELOW THIS LINE
1616
--------------------------- */
17-
var number = 5;
18-
var numberNegative = isNegative(number);
19-
var numberBetweenZeroAnd10 = isBetweenZeroAnd10(number);
20-
console.log("The number in test is " + number);
21-
console.log("Is the number negative? " + numberNegative);
22-
console.log("Is the number between 0 and 10? " + numberBetweenZeroAnd10);
17+
18+
console.log(`Is 5 negative? ${isNegative(5)}`);
19+
console.log(`Is -5 negative? ${isNegative(-5)}`);
20+
console.log(`Is 5 between 0 and 10? ${isBetweenZeroAnd10(5)}`);
21+
console.log(`Is -5 between 0 and 10? ${isBetweenZeroAnd10(-5)}`);
2322

2423
/*
2524
EXPECTED RESULT
2625
---------------
27-
The number in test is 5
28-
Is the number negative? false
29-
Is the number between 0 and 10? true
30-
*/
26+
1. Is 5 negative? false
27+
2. Is -5 negative? true
28+
3. Is 5 between 0 and 10? true
29+
5. Is -5 between 0 and 10? false
30+
*/

0 commit comments

Comments
 (0)