Skip to content

Jason Cook - Sprint Challenge: Javascript - #803

Open
sysRoot wants to merge 7 commits into
bloominstituteoftechnology:masterfrom
sysRoot:master
Open

Jason Cook - Sprint Challenge: Javascript#803
sysRoot wants to merge 7 commits into
bloominstituteoftechnology:masterfrom
sysRoot:master

Conversation

@sysRoot

@sysRoot sysRoot commented Oct 27, 2018

Copy link
Copy Markdown

Pull request to have my work reviewed by @abravebee and whomever else at Lambda.

I completed each task as subjectively as I could, though I feel I maybe spent too much time on the answers portion.

@abravebee

Copy link
Copy Markdown

Objectives

  • This sprint you worked really hard on learning the fundamentals of JavaScript! This sprint challenge will touch on each concept covered throughout this week. Follow each task in order but feel free to skip something if you're struggling and come back to it later.

MVP

Task 1: Set Up The Project With Git

  • Fork the project into your GitHub user account
  • Clone the forked project into a directory on your machine
  • You are now ready to build this project with your preferred IDE

Task 2: Comprehension Questions

Answer the following questions to the best of your ability. You can exercise your Googling skills and use training kit. Open up the Answers.md file and record your responses there.

  • Describe the biggest difference between .forEach & .map.
  • What is the difference between a function and a method?
  • What is closure?
  • Describe the four rules of the 'this' keyword.
  • Why do we need super() in an extended class?
  • Pro tip for this challenge: If something seems like it isn't working locally, copy and paste your code up to codepen and take another look at the console.

Task 3: Objects and Arrays

Test your knowledge of objects and arrays.

  • Objects

  • Object 1: Tyrannosaurus

  • Object 2: Stegosaurus

  • Object 3: Velociraptor

  • Arrays

  • Request 1: Universities

  • Request 2: ContactInfo

  • Request 3: Uni

  • Advanced Arrays

  • Request 1: .forEach()

  • Request 2: .map()

  • Request 3: .filter()

  • Request 4: .reduce()

  • Stretch

  • Arrow Functions

Task 4: Functions

This challenge takes a look at callbacks and closures as well as scope.

  • Callbacks

  • Step 1: Create a function that accepts a callback

  • Step 2: Create several unctions to callback with consume()

  • Step 3: Check work

  • Closures

  • Explanation

Task 5: Prototypes

  • Create constructors, bind methods, and create cuboids in this prototypes challenge.

  • Step 1: Base Constructors

  • Step 2: Volume Method

  • Step 3: Surface Area Method

  • Step 4: New object that uses CuboidMaker

Task 6: Classes

Once you have completed the prototypes challenge, it's time to convert all your hard work into classes.

  • Refactor into class syntax

  • cuboid.volume()

  • cuboid.surfaceArea()

  • Stretch

  • CubeMaker

Congratulations, you completed the sprint challenge!

Great

Excellent work on MVP and stretch! Great work on your answers, as well. Practice is key, but being able to put theory into words will help deepen your understanding and comfort with the concepts.

Questions/Comments

  • I gave you wrong advice! For constructors, you actually don't need to put all the property names. You can just put one variable, like so:
class secondClass extends firstClass {
   constructor(props) {
   super(props);
}
  • And the variable can be anything, as long as it's consistent in both constructor() and super(). The way you've done it works, but the example above is how you'll usually see it, especially when we get to React.

Rating: 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants