Giter Club home page Giter Club logo

array-pair-lab's Introduction

Functions on Functions on Functions Guest Starring: Arrays

Instructions

This exercise is going to get us plenty of reps in with both writing functions, and navigating through arrays.

  • In this lab you'll notice two files, and index.html file and an index.js file. The index.html file is importing the index.js file and running its code.

  • You can open the index.html file in your browser by navigating to his repo in terminal and typing open . if you're on a mac (if you're on windows, navigate to this folder in your file explorer, right click on the index.html file, select "open with" and choose your browser.) Once you open this file in the browser, open you JS console. You should see a bunch of console log errors that are undefined.

  • The console logs are logging the functions we are expecting you to write. When they are written properly in the index.js file, the desired result should be console logged in the browser

DELIVERABLES

  1. Write an function called sortCohortDesc() that sorts the ourCohort array descending alphabetically by first name (Tina's name should be first).

  2. Write an function called shortNames() that filters the ourCohort array to only students whose full name is less that 15 characters.

  3. Write a function called cohortSize() that tells you how many students there are in the ourCohort array

  4. Write a function called locateStudent() that takes in an arugment of a student name in the form of a string, and returns that student out of the ourCohort array.

  5. Write an function called phaseNames() that iterates over the coursePhases array and returns a new array of the name value from each object.

  6. Write a function that iterates over the coursePhases() array and returns all the objects with the language "JavaScript"

----------------------------------------------------------------->

ADVANCED DELIVERABLES

  1. Write a function called allTheGabes that iterates over the ourCohort array and returns the number of students with the first name "Gabriel"

  2. Write a function called studentAndPhase() that iterates over the ourCohort` array and returns a new array with each student name plus the string "is currently in Phase 1!" Example: [ "Erica Rojo is currently in Phase 1!", "Natalie Barba is currently in Phase 1!", "Joe Orekhov is currently in Phase 1!", "Tina Guliuzza is currently in Phase 1!", "Gabriel Rodriguez is currently in Phase 1!", "Shawna Akiona is currently in Phase 1!", "Charles Oneymem is currently in Phase 1!", "Melissa Funk is currently in Phase 1!", "Gabriel Miranda is currently in Phase 1!" ]

  3. Write a function called sortPhasesByName() that sorts the coursePhases array alphabetacally by the name value on each object

array-pair-lab's People

Contributors

angeloxenakis avatar cguliuzza 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.