Skip to content

Commit f2e91c5

Browse files
complete prep folder exercises
1 parent d28242a commit f2e91c5

7 files changed

Lines changed: 38 additions & 0 deletions

File tree

‎prep/comparing_values.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
console.log("hello" === "hello"
2+
);
3+
console.log("CYF" === "cyf");
4+
5+
const homeTown = "Newcastle"
6+
homeTown === "Liverpool"
7+
8+
console.log(homeTown === "Liverpool");
9+
console.log(42 === 42);

‎prep/data.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
console.log("Code Your " + "Future");
2+
console.log(10 + 32);

‎prep/errors.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const volunteer = "Shadi";
2+
const volunteer = "Abdi";
3+
4+
const volunteer = "Shadi";
5+
volunteer = "Hinde";
6+
console.log(Math.round(10.3);

‎prep/facts.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
console.log(
2+
"During Git collaboration, I learned that branches allow people to work separately, repositories can be cloned, pull requests can be used to propose changes, and changes can be reviewed before they are merged."
3+
);

‎prep/greeting.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const greeting = "Hello There";
2+
console.log(greeting);
3+
console.log("greeting");

‎prep/hello_world.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log("Hello World");

‎prep/passwordChecker.js‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const password = "secretword123";
2+
const userInput = "thisiswrong";
3+
const adminPassword = "override";
4+
let response = "";
5+
6+
if (userInput === password){
7+
response = ("Correct password entered");
8+
}else if (userInput === adminPassword){
9+
response = ("Admin access granted");
10+
} else {
11+
response = ("Incorrect password!")
12+
}
13+
14+
console.log(response);

0 commit comments

Comments
 (0)