Repository navigation
Robert Billington, CSPT2, Sprint Challenge - Javascript, PM @ JohnSpraul - #580
Open
chillingtonbillington wants to merge 6 commits into
Open
chillingtonbillington wants to merge 6 commits into
chillingtonbillington wants to merge 6 commits into
Conversation
John-Spraul
reviewed
Aug 28, 2018
John-Spraul
left a comment
There was a problem hiding this comment.
Comprehension Questions
- Describe the biggest difference between
.forEach&.map. (let's go over this) - 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?
Objects and Arrays
- Finish all work on:
objects-arrays.js
Functions
- Finish all work on:
functions.js
Prototypes
- Finish all work on:
prototypes.js
Classes
- Finish all work on:
classes.js - Stretch goal
Overall:
Great work! 🎉 Tips for the future:
- Pay attention to the instructions.
- Watch out for redundancies.
| @@ -1 +1,16 @@ | |||
| 1. A forEach loop returns the original array with the adjusted values, whereas a .map function | |||
There was a problem hiding this comment.
right line of thought, but forEach doesn't return anything unless you tell it it to
|
|
||
| - Implicit binding - When the 'this' keyword is attached to an object that | ||
| it is currently nested in. When using dot notation, it is the item to the left of 'this' | ||
| It specifies that 'this' lives in the object directly to the left of it. |
| - New Binding - Used with a constructor function. Allows us to create new classes as a variable, and once passed into the function, become the reference point for the 'this' keyword. | ||
|
|
||
| - Window Binding - When no implicit binding is specified, and no new or explicit bindings are created, the this keyword continues to zoom out and attaches itself to the window object, which is the container for all of the Javascript we code. | ||
| 5. |
| for(let i = 0; i < graduates.length; i++){ | ||
| universities.push(graduates[i].university); | ||
| } | ||
| console.log(universities) |
There was a problem hiding this comment.
instructions ask you to sort this array alphabetically
|
|
||
| // The zoos need to know their total animal population across the United States. Add up all the population numbers from all the zoos using the .reduce() method. | ||
| const populationTotal = []; | ||
| let populationTotal = []; |
There was a problem hiding this comment.
during our 1:1, I will ask you to explain this let
| */ | ||
|
|
||
| CuboidMaker.prototype.surfaceArea = function(){ | ||
| return 2 * (this.length * this.width +(this.length * this.height + (this.width * this.height))); |
There was a problem hiding this comment.
did you learn anything about JS's order of operations here?
| this.height = properties.height; | ||
| } | ||
| volume(){ | ||
| return (this.length * this.width * this.height); |
| return (this.length * this.width * this.height); | ||
| } | ||
| surfaceArea(){ | ||
| return 2 * (this.length * this.width +(this.length * this.height + (this.width * this.height))); |
| */ | ||
| class CubeMaker extends CuboidMaker{ | ||
| constructor(cMProperties){ | ||
| super(cMProperties); |
| constructor(cMProperties){ | ||
| super(cMProperties); | ||
| } | ||
| cMvolume(){ |
There was a problem hiding this comment.
whatever capitalizing system you use, be consistent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Look at all dem commits dawg...