Description
According to the docs, using var is not recommended, unless it's necessary, It would be useful to replace var in index.js with let or const depending on their scope and usage. And also as it's less error-prone, this change can make the code more robust for the possible future code change.
Task
- Replace
var with let or const in index.js file
- Update
var with let or const in README.md file
Supporting Docs and Articles
w3schools variables
Why don’t we use var anymore?