TIL Variable hoisting in ruby
by @rinas
Although I knew about hoisting in javascript, I always explicitly declare nil while writing ruby and was under the impression it will give undefined otherwise.
I might be still continue declaring explicity as it gives more clarity to me but still good to know about hoisting in ruby :)
You can read more here: https://ieftimov.com/posts/variable-hoisting-ruby/
I might be still continue declaring explicity as it gives more clarity to me but still good to know about hoisting in ruby :)
You can read more here: https://ieftimov.com/posts/variable-hoisting-ruby/