Ruby 101 Flashcards
1
Q
local variable scoping rules
A
a local variable initialized outside of a block is inaccessible inside the block
2
Q
describe what’s happening in the following assignment:
greeting = ‘Hello’
A
The greeting variable is assigned to the string ‘Hello’