Skip to content

Commit 453e086

Browse files
put let varible except const
1 parent 63fbd50 commit 453e086

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • Sprint-2/2-mandatory-errors

‎Sprint-2/2-mandatory-errors/1.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
// trying to create an age variable and then reassign the value by 1
22

3-
const age = 33;
3+
const age =33;
44
age = age + 1;
55

66
/* In this case age is not const means variable is not reassigned so that,
7-
we throws a TypeError: Assignment to constant variable.2
7+
/*we throws a TypeError: Assignment to constant variable*/
8+
//I try by let where console.log(age) shows Running] node "c:\Users\Asus\Desktop\code your future\Module-Onboarding\Module-JavaScript-Fundamentals\Sprint-2\Sprint-2\2-mandatory-errors\1.js"
9+
//34.
10+

0 commit comments

Comments
 (0)