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 afc2430 commit 920f815Copy full SHA for 920f815
3 files changed
Sprint-1/2-mandatory-errors/1.js
@@ -2,3 +2,5 @@
2
3
let age = 33;
4
age = age + 1;
5
+
6
+// The value of 'let' variable can be reassigned not the value of 'const';
Sprint-1/2-mandatory-errors/2.js
@@ -3,3 +3,5 @@
const cityOfBirth = "Bolton";
console.log(`I was born in ${cityOfBirth}`);
7
+// The first first needs to be initialised then it will be accessed;
Sprint-1/2-mandatory-errors/3.js
@@ -1,6 +1,8 @@
1
const cardNumber = 4533787178994213;
// const last4Digits = cardNumber.slice(-4);
+// slice() method cannot work on numbers.
+// I changed the numbers to string and then implemented the slice() method
const last4Digits = cardNumber.toString().slice(-4);
8
// The last4Digits variable should store the last 4 digits of cardNumber
0 commit comments