characters = [
%{name: "Han", type: :human, rebel: true, weight: 185},
%{name: "Jabba", type: :hutt, rebel: false, weight: 2200},
%{name: "Chewie", type: :wookie, rebel: true, weight: 350},
%{name: "r2d2", type: :droid, rebel: true, weight: 250},
%{name: "Luke", type: :human, rebel: true, weight: 140},
%{name: "Boba Fett", type: :human, rebel: false, weight: 175},
]
Note that there is more than one correct answer for all of these!
- In one line of code, set a variable called wookie_name to the name of the wookie character
- In one line of code, set a variable called 'weight' to how much Han weighs
Advanced (we haven't covered all of this yet, you'll likely need to read documentation)
- In one line of code, create a list of the names of the humans
- In one line of code, create a list of all the humans that weigh less than 180 lbs.