Giter Site home page Giter Site logo

cc-20c-higher-order-sort's Introduction

Code Challenge: Higher Order Fluency

Instructions

  1. Clone down this assignment to your `code-challenges' directory in AWS Cloud9.
  2. Code your solution using JavaScript in index.js.
  3. Be sure to run and test your code throughly!
  4. By the end of Code Challenge, commit and push your changes up to Github.
  5. Using the browser, verify that your solution is in your remote repo on Github.

Code Problems

All the following problems can be solved using a higher order array method. You cannot use .forEach() to solve the following problems.

Test all your solutions for the questions with the following variable:

const alumni = [
{name:'Jarrit', job:'TPT',language:'JavaScript', age:23}, 
{name:'Stephanie', job:'JPMorgan',language:'JavaScript', age:24}, 
{name:'Devonte', job:'WW',language:'JavaScript', age:23}, 
{name:'Enmanuel', job:'Asana',language:'JavaScript', age:23},
{name:'Shemar', job:'SquareSpace',language:'JavaScript', age:23},
{name:'Cielo', job:'NYT',language:'JavaScript', age:22},
{name:'Carmen', job:'Marcy Lab School',language:'JavaScript', age:21},
{name:'Itzel', job:'Marcy Lab School',language:'JavaScript', age:22},
{name:'Ray', job:'Square Space',language:'JavaScript', age:21},
{name:'Jan', job:'Square Space',language:'JavaScript', age:22},
{name:'Uzma', job:'Time Share',language:'JavaScript', age:22}]
  1. Write a function named orderedAlumni that takes an array of objects and sorts the objects by the age of the alumni from oldest to youngest.

    orderedAlumni(alumni) // returns [
    { name: 'Devonte', job: 'WW', language: 'JavaScript', age: 23 },
    { name: 'Shemar', job: 'SquareSpace', language: 'JavaScript', age: 23 },
    { name: 'Jarrit', job: 'TPT', language: 'JavaScript', age: 22 },
    { name: 'Stephanie', job: 'JPMorgan', language: 'JavaScript', age: 21 },
    { name: 'Enmanuel', job: 'Asana', language: 'JavaScript', age: 21 },
    { name: 'Cielo', job: 'NYT', language: 'JavaScript', age: 21 }
    ]

Bonus Question

  1. Write a function named alphabeticalOrder that takes an array of objects and sorts the obkects by the name of the alumni in alphabetical order.

    alphabeticalOrder(alumni)//returns [
     { name: 'Carmen', job: 'Marcy Lab School', language: 'JavaScript', age: 21 },
     { name: 'Cielo', job: 'NYT', language: 'JavaScript', age: 21 },
     { name: 'Devonte', job: 'WW', language: 'JavaScript', age: 23 },
     { name: 'Enmanuel', job: 'Asana', language: 'JavaScript', age: 21 },
     { name: 'Itzel', job: 'Marcy Lab School', language: 'JavaScript', age: 22 },
     { name: 'Jarrit', job: 'TPT', language: 'JavaScript', age: 22 },
     ...
     ]

cc-20c-higher-order-sort's People

Contributors

jo-well29 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.