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 d7626de commit 78c9889Copy full SHA for 78c9889
Sprint-1/2-mandatory-errors/1.js
@@ -1,4 +1,11 @@
1
// trying to create an age variable and then reassign the value by 1
2
3
-const age = 33;
+// const age = 33;
4
+// age = age + 1;
5
+
6
+// TypeError: Assignment to constant variable - `const` cannot be reassigned
7
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const
8
9
+// Solution:
10
+let age = 33;
11
age = age + 1;
0 commit comments