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