Skip to content

Commit 0c81be3

Browse files
committed
Returning to this Sprint, reviewed answers and sub-edited some
1 parent 66f1f8d commit 0c81be3

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Rickroll.png

189 KB
Loading

Sprint-2/1-key-errors/1.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
// Why will an error occur when this program runs?
44
// =============> write your prediction here
5+
// An error will occur because the variable decimalNumber is being declared as both
6+
// a parameter and as a local variable inside the function. This will cause a
7+
// syntax error. Additionally, the variable decimalNumber is not defined
8+
// outside the function, so it will throw a ReferenceError when trying to log it
9+
// to the console.
510
// The percentage sign is not seen as a text character but instead as code for
611
// the function to calculate the remainder after a division operation: the modulo.
712
// It will therefore not return a percentage as desired

Sprint-2/1-key-errors/2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// this function should square any number but instead we're going to get an error
55

66
// =============> write your prediction of the error here
7-
// num has not been defined and the parameter is not used in the function;
7+
// "num" has not been defined and the parameter is not used in the function;
88
// it has a number instead
99

1010

0 commit comments

Comments
 (0)