Avoid THESE 5 JavaScript Beginner MISTAKES

preview_player
Показать описание


In this video, we explore five common beginner mistakes in JavaScript and how to avoid them for better, cleaner, and more efficient code. Whether you're just starting out or looking to improve your JavaScript skills, understanding these bad practices can help you write code that is easier to maintain, debug, and optimize. We'll cover various programming and clean code principles, such as avoiding deeply nested conditionals, following the single responsibility principle, understanding object references, using event delegation, and choosing the right array methods like map and filter instead of foreach.

Host Your Own Website With Hostinger:
✌️ And get a huge discount with our code: CODING2GO

Concepts you will learn in this video:
✔ Avoiding nested conditionals in JavaScript
✔ Early return pattern for cleaner code
✔ Refactoring long functions for better maintainability
✔ Single responsibility principle in JavaScript
✔ Understanding object references vs. primitive values
✔ How to use the spread operator
✔ How to use event delegation
✔ Reducing the number of event listeners in JavaScript
✔ Choosing the right array methods (forEach, map, filter)
✔ Writing cleaner, more functional JavaScript code
✔ JavaScript coding best practices for beginners
✔ How to improve code readability and maintainability
✔ Refactoring JavaScript code
✔ Writing efficient JavaScript functions
✔ Best practices for DOM manipulation in JavaScript
Рекомендации по теме
Комментарии
Автор

Keep in mind that spreading the object will create a shallow copy, meaning that new object will keep the reference of the nested properties

nikitaliakhovka
Автор

I'm learning CSS and HTML right now and im struggling with css and i can't imagine me with JS, nevertheless I think its good to know the tips, thanks bro!

UncleKumaa
Автор

Small note, for filters it not just true or false. Anything that’s considered as truthy is accepted.

Which means false, 0, null, undefined, <empty string> are filtered.

adarsmohan
Автор

clear content, no filling. You tips are very useful

sumitsharma-ussl
Автор

Please make full course on react and express.

RASTUDIO_
Автор

When are you launching your Javascript course?

bharatdubey
Автор

Very good tips. Several things I did not know like the issue with objects. On a side note the single responsibility rule is a real pain in the *** when you have to change something. As you forever looking at tiny functions in order to work out how to implement the change.

RalfTenbrink
Автор

Split each mistake topic into the player

RedrumZT
Автор

Very informative and formative, there should be a part 2 or even a series on this.

joel-rgxm
Автор

I like how the thumbnail says style.css 😅

LongPeter
Автор

thank you very much you are awesome!!!

malavez_jarquin
Автор

Great video, Fabian. Liked as always.

PicSta
Автор

Surprisingly not that many seasoned developers use early returns either lol. Functions that do too much are easy to create when requirements changes constantly. Its natural. You need think if its worth breaking up as you make changes. Leave the code in a better state than you found it.

tvujtatata
Автор

Juniors make mistakes in building the user interface, scaling, security, and many do not have intuition regarding the performance of the code they write.
All of this has a direct impact on the product and business. On the contrary, the problems listed in this video do not affect either the business or the user. Everything in this video is said with maximum confidence, and at the same time, much is subjective and does not apply to the code of juniors, but applies to the code of developers of any level. Some of these rules need to be broken sometimes in order to write effectively.

АнтонВоронов-ыц
Автор

Somany times😅 learn JavaScript but it's forget

GaneshV-sqcz
Автор

1. You should avoid multiply "return".
2. Avoid multiply "tiny" functon.
3. Base language principles don't mention wrong programming patterns.
4. Use one action analyzer for whole document absolutely bad idea.
5. New features not always usefull.

Summary: Critical thinking is a must-have skill for a programmer.
🤘

dmitry_ainutdinov