We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56a772d commit 911fcbaCopy full SHA for 911fcba
Sprint-1/2-mandatory-errors/1.js
@@ -1,4 +1,10 @@
1
// trying to create an age variable and then reassign the value by 1
2
3
-const age = 33;
+let age = 33;
4
age = age + 1;
5
+console.log(age);
6
+
7
+// The code above will output 34, because we are reassigning the value of
8
+// age to be the current value of age plus 1. So, 33 + 1 = 34.
9
+// The error in the code is that it was trying to reassign a value to a variable
10
+// that was declared with let. This is not allowed in JavaScript.
0 commit comments