Skip to content

Commit 7959575

Browse files
chore: add logs label
add yesOrNo function
1 parent f8e8823 commit 7959575

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

main.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ function isOdd(number) {
22
return number % 2 !== 0;
33
}
44

5-
console.log(isOdd(7));
6-
console.log(isOdd(8));
5+
function yesOrNo(boolean) {
6+
return boolean ? "Yes" : "No";
7+
}
8+
9+
console.log(`7 is Odd = ${yesOrNo(isOdd(7))}`);
10+
console.log(`8 is Even = ${yesOrNo(isOdd(8))}`);
711

812
function increment(number) {
913
return number + 1;
1014
}
1115

12-
console.log(increment(7));
16+
console.log(`7 + 1 = ${increment(7)}`);

0 commit comments

Comments
 (0)