Easy

How to Implement Playlist Shuffle Functionality in JavaScript Using Method Chaining

You're developing a music app, and users can create playlists by chaining together actions like adding songs, removing songs, and shuffling the playlist. The following class handles these operations, but the shuffle functionality is incomplete. Which missing line will correctly implement the shuffle behavior?

Choose an option below