- Create a variable named
days_of_the_weekas an array of the following:- Sunday
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- Remove Sunday from the first postion and move it to the last position. Use array methods.
you can do this programmatically or just type in manually
- The first inner array should be the weekdays
- The second inner array should be the weekend days
Your choice...
Starting with the following array...
remember to test your code and use (irb/pry/p)!
planeteers = ["Earth", "Wind", "Captain Planet", "Fire", "Water"]Access the second value in planeteers.
# Your answer hereAdd "Heart" to the end of planeteers.
# Your answer hereCombine planeteers with rangers = ["Red", "Blue", "Pink", "Yellow", "Black"] and save the result in a variable called heroes.
# Your answer hereAlphabetize the contents of heroes using a method. The Ruby documentation might help.
# Your answer hereRandomize the contents of heroes using a method. The Ruby documentation might help.
# Your answer hereSelect a random element from heroes using a method. The Ruby documentation might help.
# Your answer heredisplay each hero in a new line on the terminal using the .each method
# Your answer heredisplay each hero in a new line on the terminal using the .each method only if the hero starts with the letter 'W'
# Your answer here