Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
- 6
please explain
7th Jun 2019, 7:42 AM
Cat Sauce
Cat Sauce - avatar
+ 14
You have finished 13 tutorials, so you have passed stuff that's far more complicated than loops several times. This doesn't make sense. I've seen that a few times, 'badge veterans' asking about the most basic stuff. So please enlighten me: What's going on here?
7th Jun 2019, 11:21 AM
HonFu
HonFu - avatar
+ 8
I remember that I also occasionally bought an answer with xp. But whenever I was so confused that I would have had to buy them one after another or look up the answers in the comments in order to go on, I would see that as a warning sign that I didn't really understand. Asking a question like 'I don't understand for loops' after finishing 13 full tutorials, how could that ever happen? You would have to buy and cheat your way through all of these tutorials from beginning to end. Who would do such a thing? It takes quite a while, is completely useless and should be boring as hell. I mean, loops can be messy, I struggle with them, too, here and there. But after 13 tutorials, I should understand what a for loop, generally, is!
8th Jun 2019, 8:51 AM
HonFu
HonFu - avatar
+ 5
HonFu , Basically, there are two types of learners. The performance oriented ones who just want to have the appearance of being good at programming without actually doing much work i.e. copy and paste code from others, do loads of challenges to gain loads of points and completing loads of courses without truly underestanding jack. then there is the mastery oriented ones who are more interested in truly understanding the ins and outs of a subject, they are more likely to produce code from scratch and are more likely to take their time to complete a course and revisit it once finished.
8th Jun 2019, 8:43 AM
Logomonic Learning
Logomonic Learning - avatar
+ 4
Monical, but to what end?
8th Jun 2019, 8:32 AM
HonFu
HonFu - avatar
+ 3
e.g. you want to run a code snippet 10 times: loop(10 times){ code snipped; } But there isn't a well known language which supporting this format. Instead you have to choose between a while and a for loop. Both loops are almost the same. They are just repeating code as long as a condition is set true. The for loop: for(condition){ code; } bit you should break the condition term into 3 parts: for(a variable with a value; condition; increasing size of the value){} or practicaly: for(var value=1; value < 11; value++){ //code }
7th Jun 2019, 10:55 AM
BraveHornet
BraveHornet - avatar
+ 3
HonFu It is called the imposter syndrome.
8th Jun 2019, 8:31 AM
Logomonic Learning
Logomonic Learning - avatar
+ 2
Mostly in every language loops are same ,once you got the point you have not to worry about other language​s.
7th Jun 2019, 3:47 PM
Bug Slayer
+ 2
for (let ch of "SoloLearn") { console.log(ch); }
18th Jun 2019, 1:03 PM
Varghese Jose
Varghese Jose - avatar
+ 1
Which language would you prefer to use?
7th Jun 2019, 10:29 AM
Lothar
Lothar - avatar
+ 1
Loop is like repeating or doing a process till a condition is met
15th Jun 2019, 7:25 PM
Excel
Excel - avatar
+ 1
Hello Saeed Haghighi, For loop to me is just a compressed while loop. I think the way you would understand "For loop" easily is to go again and take the lessons on "while loop". Thank you.
15th Jun 2019, 11:59 PM
Chidi Anioke
+ 1
if u want to repeaet the expression for more than 1 time, then the best way to execute ur code is to put it in a loop. To understand it,follow the key words 1.initialization. 2.condition. 3.increment/decrement. Then go through loops one by one
18th Jun 2019, 11:36 AM
Rishi Kumar Panuganti
Rishi Kumar Panuganti - avatar
+ 1
you can loop with the loop operator
24th Jun 2019, 3:22 PM
BraveHornet
BraveHornet - avatar
+ 1
and with while
24th Jun 2019, 3:22 PM
BraveHornet
BraveHornet - avatar
+ 1
and with for
24th Jun 2019, 3:22 PM
BraveHornet
BraveHornet - avatar
+ 1
mov r16, TIMES loop: //code dec r16 jnz loop
24th Jun 2019, 3:23 PM
BraveHornet
BraveHornet - avatar
0
Fill in the blanks to iterate through all the characters using the for...of loop. (let ch "SoloLearn") { console.log(ch); }
19th Jun 2020, 4:29 AM
TRINH SON
TRINH SON - avatar
0
for of
11th Aug 2021, 3:57 PM
W.G.A.C.Nandasena
W.G.A.C.Nandasena - avatar
0
const printOdds = (arr) => { arr .forEach( el => { if (el % 2 != 0) console.log(el); }); }
11th Aug 2021, 4:18 PM
W.G.A.C.Nandasena
W.G.A.C.Nandasena - avatar