-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhash-object_practice
More file actions
21 lines (11 loc) · 1.38 KB
/
hash-object_practice
File metadata and controls
21 lines (11 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// # 1. Make a hash to store a person's first name, last name, and email address. Then print each attribute on separate lines.
// # 2. Make an array of hashes to store the first name and last name for 3 different people. Then print out the first person's info.
// # 3. Make a hash to store prices for 3 different menu items. Then add a new menu item and price and print the hash to see the result.
// # 4. Make a hash to store a book's title, author, number of pages, and language. Then print each attribute on separate lines.
// # 5. Make an array of hashes to store the title and author for 3 different books. Then print out the third book's author.
// # 6. Make a hash to store 3 different states and their captitals. Then add a new state and capital and print the hash to see the result.
// # 7. Make a hash to store a laptop's brand, model, and year. Then print each attribute on separate lines.
// # 8. Make an array of hashes to store the brand and model for 3 different laptops. Then print out the second laptop's model.
// # 9. Make a hash to store definitions for 2 different words. Then add a new word and definition and print the hash to see the result.
// # 10. Make a hash to store a shirt's brand, color, and size. Then print each attribute on separate lines.
SOLUTIONS: https://github.com/TaylorOD/Deliberate_Practice-JavaScript/blob/master/solution_key/hash-object_practice_solutions.js