Skip to content

Commit 8f96ad7

Browse files
committed
Add clarification comment on variable scope for function parameters
1 parent ff1d8b8 commit 8f96ad7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • Sprint-3/1-key-errors

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ console.log(decimalNumber);
2121
// This line is outside the function and would not parse, as 'decimalNumber' only exists inside 'convertToPercentage' as a parameter.
2222

2323
// =============> write your explanation here
24-
24+
// Parameters and variables declared inside a function cannot be accessed outside it.
25+
2526
// Finally, correct the code to fix the problem
2627
// =============> write your new code here

0 commit comments

Comments
 (0)