🦸 Become A VS Code SuperHero Today: https://vsCodeHero.com
🧑🏾🤝🧑🏽 Join my Discord developer community: / discord
Did you know that you don't have to use getElementById() or querySelector() to access a DOM element that has an HTML ID?
HTML element IDs are accessible as global variables on the window object.
So, should we stop using `getElementById()` and `querySelector()`?
NO
Even though this does seem to be a convenient way to write a little less code, it should not be used.
It's always good practice to declare your variables.
_____________________________________
🚢 Deploy for FREE on Vercel: https://vercel.com/ambassadors/codest...
📚 FREE 7-Day trial at Treehouse: https://treehouse.7eer.net/codeSTACKr
_____________________________________
🛠️ Tools I use:
🟠 codeSTACKr Theme: https://marketplace.visualstudio.com/...
🟠 STACKr Code Font (Exclusive to my VS Code Course - https://vsCodeHero.com)
🟠 SuperHero Extension Pack: https://marketplace.visualstudio.com/...
_____________________________________
💖 Show support!
PayPal: https://paypal.me/codeSTACKr
_____________________________________
👀 Watch Next:
Playlist: Web Development For Beginners - • Web Development - Beginners Roadmap (2019)
_____________________________________
🌐 Connect With Me:
Website: https://www.codestackr.com
Twitter: / codestackr
Instagram: / codestackr
Facebook: / codestackr
_____________________________________
** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.
#codeSTACKr #JavaScript #learntocode
On this page of the site you can watch the video online STOP Declaring IDs!?! JavaScript Global Variables Best Practices with a duration of online in good quality, which was uploaded by the user codeSTACKr 29 December 2020, share the link with friends and acquaintances, this video has already been watched 16,024 times on youtube and it was liked by 984 viewers. Enjoy your viewing!