Skip to content

Commit 9f517e7

Browse files
committed
Add explanatory comment for parameter shadowing in convertToPercentage function
1 parent 1552743 commit 9f517e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Sprint-3/1-key-errors

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// Try playing computer with the example to work out what is going on
99

1010
function convertToPercentage(decimalNumber) {
11-
//
11+
// The parameter 'decimalNumber' is created as a variable inside the function's scope.
1212
const decimalNumber = 0.5;
1313
const percentage = `${decimalNumber * 100}%`;
1414

0 commit comments

Comments
 (0)