What are the golden rules of programming in JavaScript?

preview_player
Показать описание
In "What are the golden rules of programming in JavaScript?" I answer a subscriber question.

You can find subscriber questions here:

Рекомендации по теме
Комментарии
Автор

Effective code splitting and tree shaking can also help reduce bundle sizes significantly, though I agree wholeheartedly that eliminating excessive dependencies from a project is always a must. Another important thing to mention is that certain dependencies can also present critical security risks if they haven't been properly maintained, so it's important to run npm audits routinely to help keep your app secure and your end users (not to mention yourself perhaps from a legal standpoint) safe!

MaximillianHeth
Автор

JavaScript is all I know aside from the very basic of basics in C# so it's definitely my first love.
I learned some Basic and C++ in the 90's but I have retained basically zero memory of that venture. The only thing I really remember was the way that the Turbo C++ ide looks.

MrPDTaylor
Автор

Javascript has only 2 rules; 1. follow whatever is popular and 2. do not use javascript if you can use something better (typescript, etc).

owensoft
Автор

Fredrik: javascript is like a wild west
Me:

ohme
Автор

if someone wants to write clean JavaScript code, I highly recommend this book: "Simplifying JavaScript" by Joe Morgan.
My own golden rule for writing is to avoid using classes or constructor functions. the THIS keyword has some bugs in its design and will create a lot of confusion. JavaScript must be written in a functional way. Then it works smoothly...

MehdiBroadcasting
Автор

I have a feeling your channel is going to blow up. Also do you have a patron ?

Cognitoman
Автор

What are the few dependencies you often need ?

nikosc
Автор

The Golden Rule of JavaScript: use TypeScript.

Dimich
Автор

I came to javascript from python, need it for in the browser. It's a hot mess! My policy is only vanilla JS and don't do anything with it that you can do with something else!!!!

RC-blpm
Автор

You look like Russian gamer, his name Marmok. He has own channel on YouTube.

baryl
Автор

those are basic rules. not golden rules. anywhy, typescript would be a good choise in most cases. but it dosent mean you cant write good codes with plain JavaScript. a coder who wrote shity Js, he wrote shity Ts.

古德曼-tc