Week 3 Quiz
Submit your answers to me by email: email@example.com
- What are two ways to create an array?
- What are two ways to create a hash?
- Write code to find the number of elements in an array.
- Write code to show how to access the value of key in a hash.
- Write code to find the number of keys in a hash.
- What does the
@sign mean before a variable name in a class?
- What is the difference between
attr_accessor? Why would we want them?
- How would you check if an array is empty?