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

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/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.