Should you use var or let?
Answer / Ashutosh Sahu
In modern JavaScript, it is recommended to use 'let' or 'const' instead of 'var'. 'var' has function-scoped declaration and can lead to issues like variable hoisting and unintended global pollution. 'let' and 'const', on the other hand, have block scope.
| Is This Answer Correct ? | 0 Yes | 0 No |
program showing string concatenation?
Explain the term closure?
How we can add title of the page by javascript?
What is the use of window object?
Is Javascript a Functional Programming Language?
What is the difference of "settimeout" function and setinterval functions in javascript
Can you access Cookie using javascript?
What causes memory leaks?
How to set the focus in an element using javascript?
What is unshift method in JavaScript?
What is NaN in Javascript?
Describe javascript and vbscript.