Chapter 4 Flashcards
1
Q
What is string interpolation
A
Inserting a variable into a string:
- “Value to be inserted #{var} in this string”
- Doesn’t work with single quoted strings (‘ ‘)
2
Q
Hash arguments
A
These are equivlent
- stylesheet_link_tag “application”, { :media => “all” }
- stylesheet_link_tag “application”, :media => “all”
3
Q
What is a palindrome?
A
The same word if the letters are reveresed