Skip to content

Commit f4b2ba4

Browse files
committed
Improve phrasing in the prediction section for clarity
1 parent f08d00a commit f4b2ba4

File tree

1 file changed

+5
-4
lines changed
  • Sprint-2/1-key-errors

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
// Why will an error occur when this program runs?
44
// =============> write your prediction here
5-
// Answer
6-
// An error will occur when the program runs because a variable cannot be redeclared.
7-
// The parameter decimalNumber is already a declared variable, so it cannot be redeclared again.
5+
// Prediction
6+
// An error will occur when the program runs because a variable cannot be redeclared.
7+
// The parameter "decimalNumber" is already a declared variable, so it cannot be redeclared again using const decimalNumber = 0.5; inside the same function.
8+
89

910
// Try playing computer with the example to work out what is going on
1011

@@ -18,7 +19,7 @@
1819
//console.log(decimalNumber);
1920

2021
// =============> write your explanation here
21-
// Answer
22+
// Explanation
2223
//function convertToPercentage(decimalNumber) {
2324
//const decimalNumber = 0.5;
2425
//const percentage = `${decimalNumber * 100}%`;

0 commit comments

Comments
 (0)