Learn

In addition to Sort(), IndexOf(), and Find(), there are several other built-in methods for arrays. You can find them (and you probably guessed it) in the Microsoft documentation.

Let’s put your documentation sleuthing to use and hunt down some built-in methods to write some code!

Instructions

1.

In the Microsoft documentation, find the method that allows you to copy your playlist to a new playlist called summerStrutCopy. Print the first value of summerStrutCopy to the playlist to see if is the same as summerStrut.

2.

In the Microsoft documentation, find the method that reverses the order of the array elements. Use it to reverse the order of the summerStrut playlist. Check to see if it worked by printing the first and last songs to the console.

3.

In the Microsoft documentation, find the method that turns every rating in the ratings array to zero. Check to see if it worked by printing out the first value to the console (it should be to 0).

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?