Variables Comparison JS✍

👉 var -> Var can be re-assigned, re-defined and has a function-scope. When we declared outside the function, it has a global scope and it attached itself to the window object.

👉 let -> Let can be re-assigned. It’s scope is within a block of code…


This content originally appeared on DEV Community and was authored by Sudharshan S

👉 var -> Var can be re-assigned, re-defined and has a function-scope. When we declared outside the function, it has a global scope and it attached itself to the window object.

👉 let -> Let can be re-assigned. It’s scope is within a block of code.

👉 const -> Const cannot be re-assigned or re-defined. It’s scope is within a block of code.


This content originally appeared on DEV Community and was authored by Sudharshan S


Print Share Comment Cite Upload Translate Updates
APA

Sudharshan S | Sciencx (2021-10-19T07:10:29+00:00) Variables Comparison JS✍. Retrieved from https://www.scien.cx/2021/10/19/variables-comparison-js%e2%9c%8d/

MLA
" » Variables Comparison JS✍." Sudharshan S | Sciencx - Tuesday October 19, 2021, https://www.scien.cx/2021/10/19/variables-comparison-js%e2%9c%8d/
HARVARD
Sudharshan S | Sciencx Tuesday October 19, 2021 » Variables Comparison JS✍., viewed ,<https://www.scien.cx/2021/10/19/variables-comparison-js%e2%9c%8d/>
VANCOUVER
Sudharshan S | Sciencx - » Variables Comparison JS✍. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/10/19/variables-comparison-js%e2%9c%8d/
CHICAGO
" » Variables Comparison JS✍." Sudharshan S | Sciencx - Accessed . https://www.scien.cx/2021/10/19/variables-comparison-js%e2%9c%8d/
IEEE
" » Variables Comparison JS✍." Sudharshan S | Sciencx [Online]. Available: https://www.scien.cx/2021/10/19/variables-comparison-js%e2%9c%8d/. [Accessed: ]
rf:citation
» Variables Comparison JS✍ | Sudharshan S | Sciencx | https://www.scien.cx/2021/10/19/variables-comparison-js%e2%9c%8d/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.