var, let & const under 30 seconds in JavaScript: What's the Difference?

Опубликовано: 18 Март 2026
на канале: Learn with Shubhaw
756
26

Are you confused about the different ways to declare variables in JavaScript? In this video, we'll explore the differences between "var", "let", and "const" and help you understand when to use each one. We'll start by explaining the issues with "var" and why it's generally not recommended. Then, we'll dive into "let" and "const", two newer ways (es6 feature) to declare variables that offer more predictable behavior and block scoping. We'll show you examples of how to use each one and what happens if var and let is used outside the block scope. By the end of this video, you'll have a solid understanding of the differences between "var", "let", and "const" and be able to choose the right one for your use case.

To learn more about Javascript, it's usage and solve a lot of data structures and algorithm problems in Javascript, do subscribe to this channel.

Follow me at:
Instagram:   / shubhaw.codes  
Twitter:   / shubhaw  
LinkedIn:   / shubhaw  

#variables #variable #const #let #letslearn #javascriptforbeginners #javascripttutorial #javascripttutorialforbeginners #arrays #array #coding #tutorials #shorts #shortstutorial #programming #javascript #js #webdevelopment #webdeveloper #es5 #es6 #ecmascript #frontend #frontenddeveloper #webdev #programming #learnwithme #learnwithshubhaw