Home  >  Article  >  Web Front-end  >  How to not make other developers hate your js code ?

How to not make other developers hate your js code ?

DDD
DDDOriginal
2024-10-08 06:24:02732browse

Hello sad developers

This post is for me and for every new programmer learning JS
I want to share things I learn as a new developer learning this new jelly language called JavaScript .

honestly , I'm dragging myself into learning this language , I've read that best way to understand something is to explain what you understood out-loud , this is why I will start a new series of posts about learning JavaScript and maybe you should also give it a try and start posting

subject : How to organize your code ?

How to organize your code so it can be modified and upgraded easily so that the next developer doesn't hunt you down to take revenge

POV : The look of your office cat seeing you code without a design pattern .
How to not make other developers hate your js code ?

We newbies know that we should use variables and functions and stuff to make an working app , but something is off , why does our code look like and L letter that is hundreds of underlines ,why is the cat angry ?

no , seriously

what's wrong , why does other people code look so much better and organized but ours don't , even though we built the same app !?

Turns out there is a concept called design patterns for JavaSript , it's not just oop like we thought

The most common are :

Objects and Object Constructors
Factory Functions and the Module Pattern
Classes
ES6 Modules

In the next post I will be explaining the Objects and Object Constructors , you can go ahead of me and learn about these topic , don't wait for me .

The above is the detailed content of How to not make other developers hate your js code ?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Events: Node.jsNext article:Events: Node.js