Skip to content

Commit 34272f8

Browse files
committed
add predict and explain about the code
1 parent 772f4ab commit 34272f8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • Sprint-3/1-key-errors

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
// Predict and explain first...
22

33
// Why will an error occur when this program runs?
4-
// =============> write your prediction here
4+
// / to calculate the percentage it has used the value from
5+
// convertToPercentage() function so there will be error because
6+
// the variable name for the parameter and const is the same. and console.log is called
7+
// to print decimalNumber which is not known outside the function
8+
// instead of printing the retun value of the function.
9+
510

611
// Try playing computer with the example to work out what is going on
712

0 commit comments

Comments
 (0)