Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completed 5 questions #1261

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,44 @@ Edit this document to include your answers after each question. Make sure to lea

1. Briefly compare and contrast `.forEach` & `.map` (2-3 sentences max)

.forEach() is an advanced array method , also a callback, to iterate through each item in an array where you can return a value.

.map() is an advanced array method, also a callback, that will also iterate through each item in an array but the value returned is a new array with the items you have selected.

2. Explain the difference between a callback and a higher order function.
A callback is simply a function that is passed as an argument to another function.

A high order function is the fuction that accepts the callback as an argument or can return a callback function.

3. What is closure?
closure is when a function has access to the information or data it needs in it's lexical envrionment (both outer and local) to successfully execute. In other words, if a function has a parameter or needs an argument passed there is no closure.

4. Describe the four rules of the 'this' keyword.
Window / Global Object Binding is when the this keyword is in the global scope. It points to the window object.

Implicit binding is when their is a dot preceding a function , the object before that dot is what 'this' references.

New Binding is when we create a new instance of a constructor this then refers to the attribute of the newly created instance. For example - constructor = Fruit , new Fruit = pineapple , "this.taste" would refer to pinapple" inside the instance

Explicit binding is when override the value of the attributes with either .call or .apply

5. Why do we need super() in an extended class?

This replaced the Create Object notation - and will allow the newly created class to inherit the attributes from the parent class.

### Task 1 - Project Set up

Follow these steps to set up and work on your project:
Make sure you clone the branch that the TK links to: the vnext branch, NOT master!

- [ ] Create a forked copy of this project.
- [ ] Add TL as collaborator on Github.
- [ ] Clone your OWN version of Repo (Not Lambda's by mistake!).
- [ ] Create a new Branch on the clone: git checkout -b `<firstName-lastName>`.
- [ ] Create a pull request before you start working on the project requirements. You will continuously push your updates throughout the project.
- [ ] You are now ready to build this project with your preferred IDE
- [ ] Implement the project on your Branch, committing changes regularly.
- [ ] Push commits: git push origin `<firstName-lastName>`.
- [x ] Create a forked copy of this project.
- [ x] Add TL as collaborator on Github.
- [ x] Clone your OWN version of Repo (Not Lambda's by mistake!).
- [x ] Create a new Branch on the clone: git checkout -b `<firstName-lastName>`.
- [x ] Create a pull request before you start working on the project requirements. You will continuously push your updates throughout the project.
- [ x] You are now ready to build this project with your preferred IDE
- [ x] Implement the project on your Branch, committing changes regularly.
- [ x] Push commits: git push origin `<firstName-lastName>`.



Expand Down