Giter Club home page Giter Club logo

fun-arrays's Introduction

Fun Arrays

Functional Array method exercise

Read the instructions which are comments in the file: array-methods.js, e.g.

/*
  create an array with accounts from bankBalances that are
  greater than 100000.00
  assign the resulting array to `hundredThousandairs`
*/

var hundredThousandairs = null;

Fulfill the requirements using iterative Array methods.

THE DATA dataset.json

bankBalances holds a collection of data. At each position is an object with an amount and state property. Each of these objects represent a bank in a state. a State can have multiple banks which may be represented in the collection.

Caveats

DO NOT MUTATE THE ORIGINAL DATA.

Getting Started

  1. Clone this repository and change your current working directory to this repository
  2. Install all dependencies by running the command: npm install
  3. Your work will be done in the file named: array-methods.js
  4. Run your tests with the command: npm test
  5. Commit your code after each test passes.

References

Making Arrays More Functional

fun-arrays's People

Contributors

jaygiang avatar joekarlsson avatar melsoriano avatar nakaz avatar sgnl avatar taesup avatar theremix avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fun-arrays's Issues

Refactor exercise

I think that this exercise deserves a makeover. I think the mix of rounding errors, number parsing, and wordy descriptions take away from the intended nature of the exercise, which is using array iterator methods.

The exported json value also gets cached, and if it's modified via reassignment, it carries over to the next tests which produces some weird side effects when running with the mocha watch task.

In addition, testing the values of global variables is kind of clunky because the tests are just testing for a certain value, rather than if the code is doing the correct things. Exported functions could allow for variable cutoff points for filtering, tax values, and states to filter by.

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.