Giter Site home page Giter Site logo

songs's Introduction

馃幖 ECMAScript 6 Exercises

Table of Contents

  1. General Info
  2. Requirements
  3. Installation and run tests
  4. Exercises

General Info

This is an exercise for practice ECMAScript 6 features like map, filter, reduce, sort and ternary operators (It's mandatory to use them to manipulate arrays) for, forEach and if/else it's not allowed .It has empty functions that you should complete and run the tests, you can add parameters. It has a data file that contains songs information and your goal is to pass all tests, you don't have to show anything on the screen.

Requirements

Fork this repo into your Github account.

Installation and run tests

  • npm install
  • npm test

Use the tests/songs.test.js file to know exactly what you are asked to do but don't modify that file. Write your code in the src/song.js file.

Exercises

  • Exercise 1: funtion getAllArtists() -> write the code that gets all artists into an array.
  • Exercise 2: funtion getSongsFromArtist() -> return the objects that contains the song of a certain artist.
  • Exercise 3: funtion orderAlphabetically() -> alphabetic order the array by title.
  • Exercise 4: funtion orderByYear() -> order the array by year, ascending.
  • Exercise 5: funtion songsByGenre() -> filter songs by a certain genre.
  • Exercise 6: funtion minutsToSeconds() -> modify the duration of songs to seconds.
  • Exercise 7: funtion getLongestSong() -> get the longest song.
  • Exercise 8: function getShortestSong() -> get the shortest song. Write the test and function.

馃幖 Ejercicios de ECMAScript 6

Tabla de Contenidos

  1. Informaci贸n General
  2. Requerimientos
  3. Instalaci贸n y tests
  4. Ejercicios

Informaci贸n General

Este es un ejercicio para practicar las funcionalidades de ECMAScript 6 tales como map, filter, reduce, sort y condicionales ternarios (Su uso es obligatorio para manipular los arrays) las funcionalidades de for, forEach y if/else no est谩n permitidas. Las funciones ya est谩n declaradas y se deber谩 a帽adir el c贸digo y pasar los tests, est谩 permitido a帽adir par谩metros si se necesita. Existe un archivo deta.js que contiene un array de objetos con canciones y el objetivo del ejercicio es pasar todos los tests. No es necesario mostrar nada en pantalla.

Requerimientos

Hacer un fork de este repositorio en tu cuenta de Github.

Installation y tests

  • npm install
  • npm test

Clona tu repo en tu visual studio code e instala node (npm install), corre los tests (npm test) para mirar lo que est谩 fallando. Usa el archivo tests/songs.test.js para saber exactamente lo que se te pide pero no puedes modificar este archivo. Escribe tu c贸digo en el archivo src/song.js file.

Ejercicios

  • Ejercicio 1: funci贸n getAllArtists() -> escribe el c贸digo para obtener un array solo de artistas.
  • Ejercicio 2: funci贸n getSongsFromArtist() -> retorna todo el objeto que contiene las canciones de un artista determinado.
  • Ejercicio 3: funci贸n orderAlphabetically() -> ordena el array por t铆tulo alfab茅ticamente.
  • Ejercicio 4: funci贸n orderByYear() -> ordena el array por a帽o en orden ascendente.
  • Ejercicio 5: funci贸n songsByGenre() -> filtra las canciones por g茅nero determinado.
  • Ejercicio 6: funci贸n minutsToSeconds() -> modifica la duraci贸n de las canciones a segundos.
  • Ejercicio 7: funci贸n getLongestSong() -> obtiene la canci贸n con mayor duraci贸n en segundos.
  • Ejercicio 8: funci贸n getShortestSong() -> obtiene la canci贸n con menor duraci贸n en segundos. Escribe el test y la funci贸n.

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.