Skip to content

Sprint-Challenge--JavaScript --- Venky Yagatilee - #548

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

Sprint-Challenge--JavaScript --- Venky Yagatilee#548
vy3191 wants to merge 7 commits into
bloominstituteoftechnology:masterfrom
vy3191:master

Conversation

@vy3191

@vy3191 vy3191 commented Aug 25, 2018

Copy link
Copy Markdown

Hi,

@fireInjun

@mykeal-kenny

mykeal-kenny commented Aug 29, 2018

Copy link
Copy Markdown

Comprehension Questions

  • 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?

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

@mykeal-kenny mykeal-kenny 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.

Great Job Venky! I know this was a hard week for everyone, but you really came through!

Comment thread Answers.md
@@ -1 +1,33 @@
1. Describe the biggest difference between `.forEach` & `.map`.
map return new array of the same length and allocates new memory for the array where as forEach does not return new array. Withe respect to speed, map method is effective and most economic.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yes! This is the first perfect answer venky! Great Job!

Comment thread Answers.md
1. Describe the biggest difference between `.forEach` & `.map`.
map return new array of the same length and allocates new memory for the array where as forEach does not return new array. Withe respect to speed, map method is effective and most economic.
2. What is the difference between a function and a method?
A method is a function associated with objects where as functions are not associated with objects.

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
A method is a function associated with objects where as functions are not associated with objects.
3. What is closure?
It is the ability of a function to remember and continue to access the variables surrounded in that lexical scopes..even if you take that function send elsewhere OR pass it else where and it executes in entirely different scope.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

On a roll with the good answers Venky!

Comment thread Answers.md
}
const me = new Person("venky", 33);
4) Explicit binding:- Whenever we use javascript methods such as call(), apply(), and bind() the key word 'this' is explicit.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Perfect! Keep these in mind as everything else will build on these concepts. THIS, while being ridiculous in it's own way, will definitely make things easier to understand later on.
Exactly what I was looking for. When you're asked to write examples, try to imagine you're explaining it to a 10 year old. If you can explain it to a 10 year old, you can understand the work. Great Job!

Comment thread challenges/functions.js
console.log(consume(2,2,add)); // 4
console.log(consume(10,16,multiply)); // 160
console.log(consume("Mary","Poppins", greeting)); // Hello Mary Poppins, nice to meet you!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You follow the When in doubt when making your own code, console.log every time. rule very well!

Comment thread challenges/classes.js
*/ No newline at end of file
*/

class CubeMaker extends CuboidMaker {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I appreciate the stretch goals! These always help you grow as a programmer.

}
}
}
return arr;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice For loop! They're faster and help you get a better understanding of whats going on underneath it all.

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