I can confidently say that we can not find a better explanation for this particular problem than this one, This channel is a hidden gem ❤️👏
@lissetheflorramirezoyola65733 жыл бұрын
I'm so grateful, it's the best explanation.
@teabreak_4 жыл бұрын
Mark my words, There can never be a better explanation than this
@gogulnithin4742 Жыл бұрын
I feel so special that i found this example.... really another level explaination😮
@vivekbhatt393211 ай бұрын
This content is gold ❣
@rohithchittibommala20024 жыл бұрын
It would be appreciated if you could please start a series of JavaScript interview questions 🙂🙂🙂🙂
@bendtherules04 жыл бұрын
Hi Rohith, that's a interesting idea. Some of the things/internals (in this videos) are too detailed and not directly suitable for a interview. But it makes sense to also list down and answer a lot of the common interview-level Javascript questions.
@rohithchittibommala20024 жыл бұрын
@@bendtherules0 can we expect a series in future?
@bendtherules04 жыл бұрын
@@rohithchittibommala2002 No promises, but I'll try to do something like that later. Do you think video format works better for interview questions or text? Do you like the format that @Akshay saini uses in his youtube channel?
@rohithchittibommala20024 жыл бұрын
@@bendtherules0 yes sir It will be helpful for many freshers
@zulfikarahmad36843 жыл бұрын
Best explanation!!! Even i bad at english, i can understand this.
@mitrasu59184 жыл бұрын
This is like the most beautify Indian guy I've seen, he's straight out of Pixar movie
@taofeeqomotolani2311 Жыл бұрын
Perfect breakdown ❤
@exe.m1dn1ght10 ай бұрын
omg sir i never knew how complicated is this !!
@JavaScriptWithSohail4 жыл бұрын
Nice & unique explanation! Keep up the good work!
@waynewatson7970 Жыл бұрын
thanks
@ordaniel76992 жыл бұрын
Thank you for this clarification, needed it a lot now that I'm preparing to my Front End position interview.
@narayanareddy152 жыл бұрын
Such a Beautiful explanation! 💗 Looking for these kind of breaking down videos 😊
@ayushijindal38993 жыл бұрын
you are amazing well explained keep making such videos
@itsjmmariano4 жыл бұрын
This is great. Thanks!
@jayjani7404 жыл бұрын
2 questions. Is the new iteration scope(i.e. scope1, scope2, ...) child of the overall scope in for+let? It it is so, then how does let allow redeclaration in child scope?
@bendtherules04 жыл бұрын
Yes they are child scopes of overall. Let allows redeclaration in nested scopes, like { let a = 1 { let a = 2 console.log(a) } } (the above code is valid)
@jayjani7404 жыл бұрын
@@bendtherules0 Thanks Abhas, This cleared my doubt about redeclaring let variables in nested scope as well. No doubt, you gave the best explanation in your video. 👌
@bendtherules04 жыл бұрын
Glad you liked it 😀
@NICHLE.8 ай бұрын
Redeclaration in child scope is allowed regardless of var or let, because it is just a new scope, so in the end they will be treated as different variables. Btw this concept is called shadowing since the same named varible from the outer scope will not be considered in the inner scope, but inner scope's own variable will be considered.
@dhwajsharma3 жыл бұрын
Continue making videos sir ❤️
@dungam94023 жыл бұрын
how do I clearTimeout and stop from setTimeout before it happens
@bendtherules03 жыл бұрын
setTimeout returns a id (number) which you can pass to clearTimeout. (Is that what you meant?)
@dungam94023 жыл бұрын
@@bendtherules0 yes that's what I mean. But My case is more complicated. My setTimeout() has run in for loop in another request. And I need to stop that's before it happens in another request. How can I get the id of a specific setTimeout() ?
@bendtherules03 жыл бұрын
@@dungam9402 You can't get the id later. Sounds like you need to use a closure / private variable with your callback function, so that it store the id while calling setTimeout. On next call, it can first clear the prev timer id and then do stuff. Ex - let id = undefined; function cb() { if (id) clearTimeout(id) ; id = setTimeout(...) }
@dungam94023 жыл бұрын
@@bendtherules0 Thanks My problem is solved
@surajshetke44402 жыл бұрын
This is a really deep explanation of let . I am new to JavaScript i never know this concept If didn't watch this video. 💯👍
@MySachincool4 жыл бұрын
Great Stuff abhas :) Kudos!!
@Me-og5iy4 жыл бұрын
Loved this!!!!
@mahmoudmohamed-xu2lb2 жыл бұрын
thanks for that video bro
@miw8793 жыл бұрын
I don't understand why is everybody here appreciating you I just want my 10 mins of wasted time back what the heck man where did you even explain how come var for floop gets the highest value when used in setTimeout.
@bendtherules03 жыл бұрын
Hey, sorry for wasting your time. I didn't want to separately explain why for+var prints 10 since i thought that is rather well known. But still if you listened to the var section - i mentioned that a single variable gets modified in all the iterations and since setTimeout runs after all the iterations, it gets the final value. In my defense (😀), the video title says how for+let works and that's what i mostly focused on.
@miw8793 жыл бұрын
@@bendtherules0 I watched Akshay saini's video and understood now let is block scoped for every iteration a new the index gets a new value for call back function whereas for var it for every callback function it keeps refering to that initial single object and which after 1 second is one more than limit , and since they keep going to a callback function they execute one by one....
@miw8793 жыл бұрын
@@bendtherules0 no worries man and sorry if I was rude
@simple88103 жыл бұрын
exactly I agree with u
@VishnuV-tl9gd Жыл бұрын
Even I felt the same, not sure whos mistake is this. Is he not explaining well or are we not able to get what he is explaining. Wish you have copied the link of Akshay saini's relevant video.
@bryanhernandez60822 жыл бұрын
Hi! I need to understand this topic but I don't speak English enough. There are some video about this topic in spanish or subtitled to spanish? D:
@pankajpanday63514 жыл бұрын
did for loop created a new scope for each iteration when used with 'var' but due to hoisting the variable was available outside??......OR was that the thing that for loop did not created the new scope for each iteration at all when used with 'var' ??
@bendtherules04 жыл бұрын
Yes, the second one. It doesn't create those scopes for var. Also anyway, the difference is not really visible - effect will be same if any of these is done.
@niranjangowda926411 ай бұрын
thankyou so much
@janakiramanss62144 жыл бұрын
incrementing index value in the next iteration is the default behaviour for FOR loop or when it combines with LET it will work like this?
@bendtherules04 жыл бұрын
No, incrementing index value is not a inbuilt behavior - but typically we write index++ in last part of for loop which will increment it. We can also decrement it or write any expression. For loop only needs to evaluate that "post expression" (or whatever we call it) in every loop - for+let calls it in the start of next iteration (new scope) rather than at end of current iteration (current scope)
@MichaelSartore4 жыл бұрын
Thanks very much for this excellent description of how this works. "LET" there be light! 😜
@VikasSharma-zg2sl3 жыл бұрын
Thanku so much for making it so simple.. :) "Subscribed" for looking forward to leaning tricky concept like this from u..
@vaibhavgodase97335 ай бұрын
Thanks
@siddhartharajputsingh2 жыл бұрын
Suscribe bro... You are just amazing coder
@binayakghosh37704 жыл бұрын
bendtherules or learntherules ? 👻 Jokes apart, very nice explanation.