Update 01_javascript_refresher.md

Spelling mistake on line no. 1727. "Write" was written as "writ"
pull/337/head
kshitij33 1 year ago committed by GitHub
parent 8b41cd49c3
commit 271c117027
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1724,7 +1724,7 @@ for (let i = 0; i < 3; i++) {
// console.log(i), Uncaught ReferenceError: gravity is not defined
```
The scope _let_ and _const_ is the same. The difference is only reassigning. We can not change or reassign the value of const variable. I would strongly suggest you to use _let_ and _const_, by using _let_ and _const_ you will writ clean code and avoid hard to debug mistakes. As a rule of thumb, you can use _let_ for any value which change, _const_ for any constant value, and for array, object, arrow function and function expression.
The scope _let_ and _const_ is the same. The difference is only reassigning. We can not change or reassign the value of const variable. I would strongly suggest you to use _let_ and _const_, by using _let_ and _const_ you will write clean code and avoid hard to debug mistakes. As a rule of thumb, you can use _let_ for any value which change, _const_ for any constant value, and for array, object, arrow function and function expression.
### 7. Object

Loading…
Cancel
Save