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 (‘ ‘)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Hash arguments

A

These are equivlent

  • stylesheet_link_tag “application”, { :media => “all” }
  • stylesheet_link_tag “application”, :media => “all”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a palindrome?

A

The same word if the letters are reveresed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly