Beyonce Objects

In index.js, write functions that do the following:

  1. Print all the songs
  2. Print all the movies
  3. Return an array of all Beyonce's hit song titles
  4. Return an array of all Beyonce's fierceness ratings
  5. Return all the songs where Beyonce is wearing a bodysuit or a bodysuit is part of the video theme
  6. Return an array with all of the songs where Beyonce's fierceness is greater than or equal to a given number
  7. Return an array with all of the movies Beyonce made in 2006 and after
  8. Return all the hit songs where Beyonce was in a group
  9. Return a hit song where Beyonce's hair is blonde
  10. Return the hit song "Sorry"
  11. Return a given song
  12. Return all hit songs where Beyonce's fierceness rating is 10
  13. Return the sum of Beyonce's fierceness value for all of her hit songs
  14. Return the average fierceness value for all of her hit songs
  15. Return the sum of Beyonce's rating value for all of her movies
  16. Return the average rating value for all of her movies
  17. Return the sum of the total number of dancers in all of the hit song videos
  18. Return an array of Beyonce's hairstyles without repeats
  19. Return an object where the properties are song names and the value is an object which contains that song's fierceness and the average fierceness for all songs
  20. Return an object where the properties are movie names and the value is an object which contains that movie's rating and the average rating for all movies
  21. Return an object with Beyonce's hairstyles as the keys and a tally of each hairstyle, eg. { "blonde": 3, ... }

Note that you can and should reuse your functions and you can write more functions to further break up your work.

You can test your functions by calling them at the bottom of the file and running node index.js.