Skip to content

Weekend Task of Dima Tomilin#1

Open
DimaTomilin wants to merge 11 commits intomasterfrom
DoingTasks
Open

Weekend Task of Dima Tomilin#1
DimaTomilin wants to merge 11 commits intomasterfrom
DoingTasks

Conversation

@DimaTomilin
Copy link
Copy Markdown
Owner

Player songs that have all required function and getted over all tests. In ReadMe file you can see explanation of all functions that a use in my project else Index.js have some comments that can help to understand

Adding function play song adding some other function that will help me in future tasks and improving player methods.
Adding Functions of Removing and Adding songs. Fixing of some bags and running tests. At the moment 8/26 is completed
Adding function of removePlaylist and else some other functions that helped to do that
Adding function createPlaylist
For now 13/26 tests are completed
Adding function playPLaylist
Adding editPlayList function
Adding playlistDuration function
Adding functions of searching and completed of all tests
Make ReadME file more useful.
],
playSong(song) {
console.log(/* your code here */)
console.log("Playing "+song.title+" from "+song.album+" by "+song.artist+" | "+toCorrectDuration(song.duration)+".")
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

},
}

function toCorrectDuration(seconds){ //transform duration for people
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 better function name

function songById(id){
let songObj=player.songs.find(x=> x.id===id);
if (songObj===undefined){
throw "Not a Valid ID"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

new Error

}

function songById(id){
let songObj=player.songs.find(x=> x.id===id);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why not const

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.

3 participants