Skip to content

Commit e49f9cb

Browse files
Completed first error
1 parent d28242a commit e49f9cb

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const minimum = 1;
1+
/*const minimum = 1;
22
const maximum = 100;
33
44
const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
@@ -7,3 +7,12 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
77
// Try breaking down the expression and using documentation to explain what it means
88
// It will help to think about the order in which expressions are evaluated
99
// Try logging the value of num and running the program several times to build an idea of what the program is doing
10+
<<<<<<< Updated upstream
11+
=======
12+
console.log(num)*/
13+
14+
function greet(timeOfDay, name="edward"){
15+
console.log(`Good ${timeOfDay}, ${name}.`);
16+
}
17+
console.log(`hello${greet("12:00")} how are you?`)
18+
>>>>>>> Stashed changes

‎Sprint-3/1-key-errors/0.js‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
// Predict and explain first...
22
// =============> write your prediction here
3+
//"str" is not a valid variable name
34

45
// call the function capitalise with a string input
56
// interpret the error message and figure out why an error is occurring
67

78
function capitalise(str) {
8-
let str = `${str[0].toUpperCase()}${str.slice(1)}`;
9+
let str= `${str[0].toUpperCase()}${str.slice(1)}`;
910
return str;
1011
}
1112

12-
// =============> write your explanation here
13+
// =============> write your explanation heres
1314
// =============> write your new code here
15+
function capitalise(str) {
16+
let string1= `${str[0].toUpperCase()}${str.slice(1)}`;
17+
return string1;
18+
}

0 commit comments

Comments
 (0)