Skip to content

Robert Billington, CSPT2, Sprint Challenge - Javascript, PM @ JohnSpraul - #580

Open
chillingtonbillington wants to merge 6 commits into
bloominstituteoftechnology:masterfrom
chillingtonbillington:master
Open

chillingtonbillington wants to merge 6 commits into
bloominstituteoftechnology:masterfrom
chillingtonbillington:master

Conversation

@chillingtonbillington

Copy link
Copy Markdown

Look at all dem commits dawg...

@John-Spraul John-Spraul left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Answers.md
@@ -1 +1,16 @@
1. A forEach loop returns the original array with the adjusted values, whereas a .map function

@John-Spraul John-Spraul Aug 28, 2018 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right line of thought, but forEach doesn't return anything unless you tell it it to

Comment thread Answers.md

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Comment thread Answers.md
- 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is #5? 🔍 🤷‍♂️

for(let i = 0; i < graduates.length; i++){
universities.push(graduates[i].university);
}
console.log(universities)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 = [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

during our 1:1, I will ask you to explain this let

Comment thread challenges/prototypes.js
*/

CuboidMaker.prototype.surfaceArea = function(){
return 2 * (this.length * this.width +(this.length * this.height + (this.width * this.height)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you learn anything about JS's order of operations here?

Comment thread challenges/classes.js
this.height = properties.height;
}
volume(){
return (this.length * this.width * this.height);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be indented

Comment thread challenges/classes.js
return (this.length * this.width * this.height);
}
surfaceArea(){
return 2 * (this.length * this.width +(this.length * this.height + (this.width * this.height)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

insert indent here

Comment thread challenges/classes.js
*/
class CubeMaker extends CuboidMaker{
constructor(cMProperties){
super(cMProperties);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 too many indents

Comment thread challenges/classes.js
constructor(cMProperties){
super(cMProperties);
}
cMvolume(){

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whatever capitalizing system you use, be consistent

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