Do THIS to Write Clean Code! | JavaScript Pro Tips (2021)



🦸 Become A VS Code SuperHero Today: https://vsCodeHero.com
🧑🏾‍🤝‍🧑🏽 Join my Discord developer community: https://discord.gg/A9CnsVzzkZ

Do you want to write code like a pro? In this video, I’ll give you some examples of code that works, but could be written better. Make sure you watch through all of the examples so that you can learn how to start writing clean, professional code.

Inspiration for this video came from this repo from Ryan McDermott:
Clean Code JavaScript – https://github.com/ryanmcdermott/clean-code-javascript

@James Q Quick – Quokka.js VS Code Extension – https://youtu.be/yeZa4QsX38w
_____________________________________

🤖 Get FREE AI-powered code completions from Kite: https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=codestackr&utm_content=description-only
📚 FREE 7-Day trial at Treehouse: https://treehouse.7eer.net/codeSTACKr
_____________________________________

🛠️ Tools I use:
🟠 codeSTACKr Theme: https://marketplace.visualstudio.com/items?itemName=codestackr.codestackr-theme
🟠 STACKr Code Font (Exclusive to my VS Code Course – https://vsCodeHero.com)
🟠 SuperHero Extension Pack: https://marketplace.visualstudio.com/items?itemName=codeSTACKr.superhero-extensions
_____________________________________

⏱️ Timestamps ⏱️
00:00 – Intro
00:35 – Declaring Variables
00:59 – Assigning Values
01:23 – Naming Variables
03:18 – Don’t Rely on Developer Memory
03:55 – Unnecessary Context
04:34 – Destructuring
05:31 – Objects & Guard Clauses
07:39 – Default Arguments
08:54 – Conditional Shorthand
09:34 – Template Literals
11:19 – Write Linear Code
13:02 – Single Responsibility Principle
14:38 – Don’t Use Flags
16:34 – Avoid Side Effects
18:41 – Spread Operator
19:46 – Optional Chaining
20:37 – Ternary Operator
22:02 – Default Values
23:04 – Swap Two Variables
23:59 – Arrow Functions
24:57 – String to Number
_____________________________________

💖 Show support!
PayPal: https://paypal.me/codeSTACKr
_____________________________________

👀 Watch Next:
Playlist: Web Development For Beginners – https://www.youtube.com/watch?v=Ez4yHS2dsN8&list=PLkwxH9e_vrAJ0WbEsFA9W3I1W-g_BTsbt
_____________________________________

🌐 Connect With Me:
Website: https://www.codestackr.com
Twitter: https://twitter.com/codeSTACKr
Instagram: https://instagram.com/codeSTACKr
Facebook: https://facebook.com/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

source