Answer the question
In order to leave comments, you need to log in
Where can I find more ready-made solutions for this type?
Hi, I’ll make a reservation right away that the question may seem ridiculous, because. The wording in my head is not very clear.
I study js and when I solved various kinds of problems in the solution examples I found the following universal elements:
1) for example, if we need a variable to increase by a certain value during the cycle and not forget its previous value, but it was written like this:
let num = 0;
for(let i=0; i<10; i++){
num+=i
} And I would not have thought of this myself num+=
2) When I was solving the fibonacci problem, I saw a solution where the counter in the loop was used to iterate over the elements of the array:
let num = [1,2,3,4,5];
for(let i=0; i<10; i++){
num[i]=....
} And again, I myself would not have thought of using it like that. These templates / tools help to solve various problems, but I don’t know where to find more such universal ready-made solutions? Most likely it's just the lack of flexibility of my brains, but still I wonder if there is such a place all in one place.
I just don't even know what they're called, just to google it. I really hope that you understand what I mean and help with the search.
Answer the question
In order to leave comments, you need to log in
Lack of knowledge of the basic features of the language. Study any modern JavaScript textbook from cover to cover. A good option learn.javascript.ru
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question