All Pro Web Designs > > Learning Tutorials > Programming Languages > JavaScript > The Difference Between var and let in JavaScript
The Difference Between var and let in JavaScript
- January 28, 2024
- Posted by: MainInstructor
- Category: JavaScript
Video Title: The Difference Between var and let in JavaScript
-
Sale!
Wireless WIFI Repeater Extender Amplifier Booster 300Mbps
$29.99$14.99 Add to cartWireless WIFI Repeater Extender Amplifier Booster 300Mbps
Categories: Electronics, Wi-Fi Router, Wireless Wi-Fi Extender Tags: 300Mbps, 802.11N, Amplifier, Booster, Extender, mobile wi-fi booster, Remote, WIFI, Wireless, Wireless WIFI, Wireless WIFI Repeater, Wireless WIFI Repeater Extender, Wireless WIFI Repeater Extender Amplifier, Wireless WIFI Repeater Extender Amplifier Booster, Wireless WIFI Repeater Extender Amplifier Booster 300Mbps$29.99$14.99 -
Sale!
Full RGB Light Design Gaming Headset Headphones with Mic
$24.99$14.99 Add to cartFull RGB Light Design Gaming Headset Headphones with Mic
Categories: Electronics, Gaming, Gaming Headsets Tags: Design, Full, Full RGB Light Design Gaming Headset, Full RGB Light Design Gaming Headset Headphones, Full RGB Light Design Gaming Headset Headphones with Mic, Gamer, Gaming, Gaming Headset Headphones, gaming headset wireless, Headphone, Headphones, Headset, Light, Mic, Package, RGB$24.99$14.99 -
Sale!
Wireless BlueTooth Multi-Device Keyboard Mouse Combo
$39.99$19.99 Add to cartWireless BlueTooth Multi-Device Keyboard Mouse Combo
Categories: Electronics, Gaming, Gaming Keyboards, Keyboard Mouse Combos Tags: Combo, Keyboard, keyboard mouse combos, Mouse, MultiDevice, Set, WireKeyboard Mouse Combo, Wireless, Wireless BlueTooth Keyboard Mouse Combo, Wireless BlueTooth Keyboard Mouse Combos, Wireless BlueTooth Multi-Device Keyboard Mouse Combo, Wireless BlueTooth Multi-Device Keyboard Mouse Combos$39.99$19.99 -
Sale!
High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
$199.99$139.99 Add to cartHigh Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
Categories: Gaming, Gaming Chairs Tags: Adjustable, Chair, computer chairs, Desk, Executive, Gaming, Girl, Headrest, High, High Back Leather Executive Adjustable Swivel Gaming Chair, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar, High Back Leather Executive Adjustable Swivel Gaming Chairs, Leather, Lumbar, Office, Racing, Swivel$199.99$139.99 -
Sale!
Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
$29.99$19.99 Select optionsProfessional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
SKU: N/A Categories: Electronics, Gaming, Gaming Headsets Tags: Cancelling, Gaming, Gaming Headphones with Noise Cancelling Microphone, gaming headset, Headphones, Headset, LED, Light, Mic, Microphone, Noise, Professional, Professional LED Light Wired Gaming Headphones, Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone, Wired, Wired Gaming Headphones, Wired Gaming Headphones with Noise Cancelling Microphone$29.99$19.99 -
Sale!
Gaming Desk with LED Lights USB Power Outlets and Charging Ports
$349.99$249.99 Select optionsGaming Desk with LED Lights USB Power Outlets and Charging Ports
SKU: N/A Categories: Computer Desk, Gaming, Gaming Desk Tags: and Charging Ports, Charging, Desk, Desks, Gaming, gaming desk with led lights, Gaming Desks with LED Lights, Home, LED, Lights, Monitor, Office, Outlets, Port, Power, Room, Stand, USB, USB Power Outlets, White, Workstation$349.99$249.99 -
Sale!
Wired Mixed Backlit Anti-Ghosting Gaming Keyboard
$99.99$79.99 Add to cartWired Mixed Backlit Anti-Ghosting Gaming Keyboard
Categories: Electronics, Gaming, Gaming Keyboards Tags: Antighosting, Backlit, Blue, brown, Gaming, Gaming Keyboard, gaming keyboards, gaming keyboards and mouse, Keyboard, Laptop, Switch, Wired, Wired Mixed Backlit Anti-Ghosting Gaming Keyboard, Wired Mixed Backlit Anti-Ghosting Gaming Keyboards, Wired Mixed Backlit Gaming Keyboard$99.99$79.99 -
Sale!
Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
$119.99$59.99 Add to cartWireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
Categories: Electronics, Gaming, Gaming Headsets Tags: 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, ANC, Audio, Bluetooth, Cancellation, Ear, Earphone, gaming headset, Headphones, Headset, Hi-Res Over the Ear Headphones Headset, HiRes, Noise, Wireless, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Headphones, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headsets$119.99$59.99 -
Sale!
Wired Sports Gaming Headset Earbuds with Microphone
$19.99$9.99 Select optionsWired Sports Gaming Headset Earbuds with Microphone
SKU: N/A Categories: Gaming, Gaming Headsets Tags: Accessories, Earbud, Earphone, Earphones, Gaming, gaming headset with microphone, Headphones, Headset, IOS, Microphone, Sports, Wired, Wired Sports Gaming Headset Earbuds, Wired Sports Gaming Headset Earbuds with Microphone, Wired Sports Headset Earbuds$19.99$9.99 -
Sale!
150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
$49.99$29.99 Add to cart150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
Categories: Charging Stations, Electronics Tags: 150W, 150W Charging Station, 150W Universal Multi USB Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Stations, 150W Universal Multi USB MAX Charging Station, 16 Port MAX Charging Station, 3.5A, Charger, Charging, Fast, laptop charging stations, Max, Multi, Port, Stand, Station, Universal, USB$49.99$29.99
Thank you for demystifying JavaScript
Hi Stephen. I understand let and const are hoisted into the TDZ and allocated seperate memory until initialized and put into a seperate memory block space rather than on the global object. Is this memory space for let and const not accessible in the browser in the same way that var variables can be viewed by expanding the window object? It looks to me like let and const memory is invisible in the browser and you can't go into devtools and look for all your initialized let and const variables? Why is this? Also when typing a let variable into the console that already exists – why does the console know that you are not referencing a variable on window and to look at the block memory?
Thank you.
thanks sir
Thanks a lot buddy!
Thanks a lot
Every UI developer should see these tutorials!
These are such good examples – I am signing up for your advanced classes too! Thank you
I just finished the Getting Started training from Udemy and starting the advanced. Recommended for everyone who is looking for JS training.
U deserve Best tutor award 👏🏽
Hello 👋 I just want to let you know I have purchased the Advanced JavaScript Class and I am really happy to start my journey. You are really amazing 😉 and I really like what you do. I send you this message as a reminder that const and let are not exotic features of JavaScript. As you know from my previous messages I am kind of in love with JavaScript and all of it’s new features (I should probably become a JS evangelist because it’s a true religion to me) I would like to first say that I respect your experience and I know that you are an old school developer and I am a n00b … 😉 But I would love you to reconsider using const to remplace let or var everywhere except when you know you will need to reassign the same variable in your code (in fact in your case it could be different because you have small examples to quickly show some functionality) the const keyword should not be confusing if well explained to newcomers (and since you are so good at explaining people will not be confused let me explain) of course it’s probably important first to do the parallel with other language where it would signal immutability obviously in JavaScript it is different… To be able to be comfortable with that special friend the way to understand it and then the way you should probably explain it I think is at first point out that objects are references and that cosnt set a constant reference to the object location in memory and that’s what will not change the key here is the possible optimization in the interpreter if this location in memory is set permanently with const after this is said then that notion of constant is more easy to accept than if pointing first that it’s not useful because you can change your object’s values even using the word const … Obviously it is super important to mention but by mentioning it first it sets in the mind of newcomers that JavaScript is that weird beast and that everything is illogical with that language… Evidently I was previously just saying “religion” in a metaphorical way and therefore JavaScript is not dogmatic (au contraire) but I would like to see the people who are new to JavaScript being introduced to the const keyword in a way that won’t make it look stranger than he really is … const to me should be the new var all the time and let should be the exception used for primitive that will need to be reassigned… but it’s my point of view and I hope you will find something useful for your students in flipping around your point of view and paradigm regarding what costs should really mean to JavaScript development (I should do my first post on medium haha it’s long enough to be monetize LoL 😂)
Thanks for the simple and easily understood examples.
best topic
very good examples
Thanks
Thanks for the video. Really helpful.