Skip to content

Another one#1

Open
sagigolan8 wants to merge 21 commits intomasterfrom
Another-One
Open

Another one#1
sagigolan8 wants to merge 21 commits intomasterfrom
Another-One

Conversation

@sagigolan8
Copy link
Copy Markdown
Owner

It was lovely 👍

just checking
throw messege works too
help us to generate new ID that we know for sure isn't exist
In, addition the generate uniqe ID works for this two functions
used at playSong function
should to conver from mm:ss format to seconds
added the songs:[] property neacuse this is how a cell in the array should look like
the problem was that, when we used the function removeSong the song was remove from the songs object and the playlist,
the new function fixed that
],
playSong(song) {
console.log(/* your code here */)
console.log(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use string template (``)

for (let i = 0; i < player.songs.length; i++) {
//runs on the songs array
if (player.songs[i].id === id) {
player.playSong(player.songs[i])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

break after finding id?


function editPlaylist(playlistId, songId) {
// your code here
if (!checkId(player.songs, songId))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe move this logic to a function?

for (let i = 0; i < player.songs.length; i++) {
//for songs
if (
player.songs[i].album.toUpperCase().includes(tempQuery) ||
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to a function or put all the fields you want to check to array and loop through them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants