GithubHelp home page GithubHelp logo

bc_pratice_test's Introduction

bc_pratice_test

Welcome to the 1st Annual Alien Dog Show!

Since this is our first event, we're hiring jr Developers like yourself to make sure things don't go wrong. Let's get started!

  1. Since this is an intergalatic event, many of our patrons speak different languages! Assign a function to our our greeting variable that takes 3 inputs: greeting, location and time. Concatanate these values together to form a viable sentence and log it to the console. Don't forget the spaces!

  2. We have more contestants than anticipated. (We actually don't have a count!) Assign a function to our contestants variable that will return the number of entries in our dogs array.

  3. Oh no! Some of our contestants aren't even dogs! Using the native filter method with our dogs array, create an array called filterSpecies that will filter out all of the species that are not dogs!

  4. For safty purposes, let's create a copy of our array. Using the spread operator, assign a copy of our filteredSpecies array to our dogContestants variable.

  5. Now that we have our dogContestants array, we need to add a class property to each dog object. Using the native map method, add a key of class with the value: - "red" if the dog's weight is between 0 and 10. - "yellow" if the dog's weight is between 11 and 20. - "green" if the dog's weight is 21 or over.

  6. The votes are in! We have an array of the top dogs in each class Using recursion, copy all of the properties into one object and return that object. If you'd like an idea of our data structure, look in the dogData.js file.

  7. For statistical reasons, lets count all of the votes we recieved for our dog and non-dog contestants! Using reduce, find the sum of the votes casted.

bc_pratice_test's People

Contributors

kchresfield avatar livrush avatar

Watchers

 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.