Skip to content

Commit 8b0639e

Browse files
author
Christopher Harrison
committed
Initial setup
1 parent cc5a38d commit 8b0639e

32 files changed

+894
-1
lines changed
File renamed without changes.
File renamed without changes.

10-dates/dates.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const now = new Date();
2+
const win95Launch = new Date(1995, 7, 24);
3+
4+
console.log(now);
5+
console.log(win95Launch);
6+
7+
const demoDate = new Date();
8+
demoDate.setMonth(0);
9+
console.log(demoDate);
10+
11+
console.log(`Day of week: ${demoDate.getDay()}`);
12+
console.log(`Date: ${demoDate.getDate()}`);
13+

11-boolean-logic/and.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const status = 500;
2+
3+
if (status === 200) {
4+
console.log('OK!');
5+
} else if (status === 400 || status === 500) {
6+
console.log('Error!');
7+
} else {
8+
console.log('Unknown status');
9+
}

11-boolean-logic/case-sensitive.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const status = 'error';
2+
3+
if (status.toUpperCase() === 'ERROR') {
4+
console.log('Something went wrong!');
5+
} else {
6+
console.log('Looks great!!');
7+
}

0 commit comments

Comments
 (0)