Git Product home page Git Product logo

hs-intro-web-design-playlist-maker-meteor-web-development's Introduction

Playlister

<img src="https://s3.amazonaws.com/after-school-assets/music.gif"width="300" hspace="10" align="right">

We all use music streaming apps, Spotify, Itunes, Apple Music. So how do all of those apps work? How do they let you add and remove songs whenever you want? Well the best thing is that you're a developer now. You can build your own playlister!

Get To Work

You'll be coding your solution in js/playlister.js. You'll want to have index.html open in the browser in order to test your work.

  • Step 1: declare a variable playlist to store your playlist. You'll want this variable to store an empty array, which will contain your list of songs.

  • Step 2: Using the prompt method, prompt the user for if they would like to add or delete a song from the playlist. Remember, a user shouldn't be able to delete a song if there aren't songs on the playlist yet.

  • Step 3: If a user selects to add a song, they should be prompted to enter a song title, and the song should be added to the playlist array.

  • Step 4: If a user selects to delete a song, they should be prompted to enter a song title to delete. The song should then be removed from the playlist array.

  • Step 5: Every time a user adds a song or deletes a song from the playlist, they should receive an alert that lists all the songs on their playlist.

BONUS

  • Add an alert if a user tries to delete a song that isn't on the Playlist

  • Once a user adds a song, the alerts stop. See if you can build in a loop so the user will continually be prompted to add or a delete a song until they say they're done editing their playlist.

DOUBLE BONUS

  • We haven't covered functions in this class, but see if you can compartmentalize the code into functions. Remember, each function should do one thing and one thing only (i.e: an addSong function, a deleteSong function etc,)

View Playlister on Learn.co and start learning to code for free.

hs-intro-web-design-playlist-maker-meteor-web-development's People

Contributors

victhevenot avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.