Given the array
["Harry Potter", "Hermione Granger", "Ron Weasley", "Luna Lovegood"]
Use #each to do the following:
- Print out each name.
- Print out each name in lower case.
- Print out each name in all uppercase.
- Print out only the first name.
- Print out only the last name.
- Print out the length of each name.
- Print out the last name and then the first name.
Given the array
["Harry Potter", "Hermione Granger", "Ron Weasley", "Luna Lovegood"]
Use #each to do the following:
- Create a new array with the names all in lower case.
- Create a string consisting of the names all in upper case.
- Create a new array with only the first names.
- Create a new string consisting of only the last names.
Given the array
[1,20,3,40,5,123,435]
Use #each to do the following:
- Create an array of all the even numbers.
- Create an array of all the numbers greater than 15.
- Get the sum of all the numbers.
- Multiply all of the numbers together.
Given the Array
[1,20,3,40,5,123,435]
Use #each to do the following:
- Return the first even number.
- Return an array of all th even numbers.
- Return all numbers that are bigger than three digits.