+ 4
Challenge Answers Explained
I think it would be very helpful to see challenged explained or have the ability to comment and discuss the questions as we do in the learning quizzes. I know we can see the correct answers once the challenge is completed which is very helpful but I don’t always understand the answer and would love the feedback. Is there a way to get this that I am missing?
10 ответов
+ 24
8*3 +1 =24 +1 =25
//before 25 ... 22 will be there[21+1 ie 3*7+1] [in 7th cycle of loop]
//condition true for 7th cycle ... but just after getting 25 [in end of 7th cycle ie beginning of 8th cycle], loop stops as condn becomes false [25 is !smaller than 24].
//btw My name is "Gaurav" , every time some1 do this 😅
//hope It makes sense,anydoubt will be answered later(time up)
+ 22
//welcome & here is the more explanation ☺👍
//yeah , nice name to me [will try harder to deserve that respect]
see carefully , there is a table of 3 going ... if initial value of var i be 0
... 0 ,3,6,9,12,15,18,21,24,27
//if var i is 1 ... then +1 to each term
.... 1,4,7,10,13,16,19,22,25,28
//so did U notice , no 26 comed in the series ... its 25 [not 26]
+ 21
comment box suggestion
https://www.sololearn.com/Discuss/1189242/?ref=app
+ 21
welcome & thanks 4 kind words ☺👍Levi
+ 3
There is nothing stopping you from posting the question here.
Here is an example of where I did exactly that.
https://www.sololearn.com/Discuss/1017883/?ref=app
+ 2
Thanks Louis and Gautama. I am going to take you up on both of your suggestions.
+ 2
Here is the question that I am struggling with. It is basic JS:
What is the output of this code?
for (var i = 1; i<24; i += 3) {}
alert (i)
The answer is 25, but I am not seeing why. I am sure it will hit me in the face once explained but can’t find the answer online.
+ 1
Sorry Gaurav... spellcheck wants to change your name to the Buddha apparently. :) That said, I really appreciate you taking the time to respond, but still confused... where are you getting the 8? Wouldn’t the loop stop at 23 just before 24 and then simply add 3 to make 26?
+ 1
I get it!! I didn’t realize the i += 3 meant incremento by threes I thought it meant add three. Totally get it... your the best and deserve the respect of both names.
+ 1
Thank you!!!