A
A
Alex2021-12-18 15:05:03
JavaScript
Alex, 2021-12-18 15:05:03

I do not understand my own and other people's code?

Hello! I'm currently trying to learn JavaScript. In the course of learning the language, it became interesting for me to look at someone else's code. And when I open some script on the site, then in the script, instead of the normal names of variables, functions, and other things, I see the entire English alphabet. How can you write like that? I just don't understand what is in such variables. And the code in such scripts consists of thousands of lines, almost every variable is used many times in the script, and I just can’t understand anything there. In such scripts, where only letters are used, do people first write the script with normal function names, and then they distill the script somewhere and replace all adequate names with letters?

And one more problem. When I try to solve some problem or write some simple function, it can take me several hours or even days, while for other people it takes many times less time. And in the end, even after I manage to solve the problem, I still cannot understand how I solved it. I look at the code and don’t understand what the hell I wrote here and re-solving the problem again takes a very long time.
And how do you do it? Did you understand someone else's code? Do you have blunts even in your own code?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DevMan, 2021-12-18
@NJohnDoe

m - minification .

T
ThunderCat, 2021-12-18
@ThunderCat

Most often, popular scripts are published in 2 formats - not packaged, such as and minified, such as script.min.js, which take up less space, but become less readable. You need the first option to study.

M
Michael R., 2021-12-18
@Mike_Ro

do people first write the script with normal function names, and then they distill the script somewhere and replace all the adequate names with letters?

https://babeljs.io/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question