GithubHelp home page GithubHelp logo

underscore_weekend_lab's Introduction

Weekend Lab Part 2 - Implement Underscore.js Methods

For the second part of your long weekend lab, we'd like you to rewrite some underscore.js methods and tests that make them pass. The functions you will be implementing are:

  1. First - http://underscorejs.org/#first
  2. Last - http://underscorejs.org/#last
  3. Uniq - http://underscorejs.org/#uniq
  4. Pluck - http://underscorejs.org/#pluck
  5. Contains - http://underscorejs.org/#contains

How to tackle this assignment

  1. Fork and Clone the repo and then run npm install to make sure you pull in Chai.
  2. First, start with some research, make sure you know exactly what these five functions do before you try to implement them on your own.
  3. The "describe" and "it" blocks have been written for you, so start by writing the appropriate tests that match what is inside the "it" block.
  4. Once your tests are written, try to write a function that makes the test pass.

Bonus

Implement the function flatten - http://underscorejs.org/#flatten - you will need to use recursion to solve this.

Final note

Not only is reimplementing JavaScript functions a fantastic way to improve your JS and TDD skills - it's also a super super common interview question, so the more you can practice earlier the better. This is going to be challenging, but if you get stuck, move to the next function or use each other and Stack Overflow to help. We will review everything after the long weekend, so if you are struggling, don't get discouraged!

underscore_weekend_lab's People

Contributors

elie avatar

Watchers

James Cloos 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.