Skip to content

Commit 1b09621

Browse files
debug2604debug2604
authored andcommitted
2-mandatory-debug 0.js added Undefined in expectation.
1 parent a243d6d commit 1b09621

8 files changed

Lines changed: 25 additions & 4 deletions

File tree

‎Sprint-3/2-mandatory-debug/0.js‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
// Predict and explain first...
22

3-
// =============> console.log in local function will result the product. But console.log in global scope will not call function multiply.
3+
// =============> Undefined. console.log in local function will result the product. But console.log in global scope will not call function multiply.
44

55
//function multiply(a, b) {
66
// console.log(a * b);
77
//}
88

99
//console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
1010

11-
// =============> The function multiply does not really carry out the multiplication. It only logs the result of a*b. That's why calling multiply become undefined.
11+
// =============> The function multiply does not really carry out the multiplication. It only logs the result of a*b. That's why calling multiply become undefined.
1212
// Finally, correct the code to fix the problem
1313
// =============> write your new code here
1414
function multiply(a, b) {
1515
return a * b;
1616
}
1717

1818
console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
19-
20-

‎Sprint-3/I‎

Whitespace-only changes.

‎Sprint-3/Prep/.gitattributes‎

Whitespace-only changes.

‎Sprint-3/Prep/Math-round‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Math.round(0.00005);
2+
let round = Math.round(0.00004);
3+
4+
round = round + 10;
5+
console.log(round);

‎Sprint-3/Prep/demoTrackfile.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
this is a file to demo tracking file
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is untracked file demo
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//passwordCheckerFunction
2+
3+
const password = "secretworld123"; //A password value stored
4+
5+
function passwordChecker(userInput) {
6+
//Compare user input with password stored
7+
if (userInput === password) {
8+
//then response if password is correct
9+
console.log("password is correct");
10+
} else {
11+
//else response if password is incorrect
12+
console.log("password is not correct, please try again");
13+
}
14+
}
15+
16+
passwordChecker("Helloworld125");

‎Sprint-3/The‎

Whitespace-only changes.

0 commit comments

Comments
 (0)