[UNANSWERED]The first rule of the blocks' club | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

[UNANSWERED]The first rule of the blocks' club

You mustn't ever tell anybody about the blocks' club. What exactly I am talking about is variable declaration inside blocks. For example, if I declare a variable inside for loop, it won't be accessible outside the loop. The same applies for try-catch blocks and other, as I have understood from frequent errors. Any material on that? Why is it so and is it inevitable practice to declare a variable outside the block, passing it to the block and afterwards accessing it outside?

15th Apr 2017, 2:04 PM
Alex Snaidars
Alex Snaidars - avatar
3 ответов
+ 8
what happens in the blocks' club, stays in the blocks' club
15th Apr 2017, 2:09 PM
Manual
Manual - avatar
+ 5
this is probably the funniest post and reply i have seen on here
15th Apr 2017, 4:29 PM
Edward
0
@Manual That must be very funny indeed, but I need some helping material.
16th Apr 2017, 9:17 AM
Alex Snaidars
Alex Snaidars - avatar