Samarvir Singh - #295
Conversation
|
@samarv 👋 It's nice to see that you are committing frequently. You get a gold ⭐️ !! Your git log tells the story of your development adventure. I'd ❤️ to know more about your adventure! While the Git commit titles are short, you can add a "body" to the messages which can be much more detailed. BEFORE you add the closing quote to the commit message, hit enter twice to add a new line between the title and the body. For example: ...on GitHub in the Pull Requests, the body will be accessible by clicking on the three little dots: ...such that they will reveal the BODY: If you're not already in the #git channel in Slack, come check it out: https://lambdaschoolstudents.slack.com/archives/C5Z8BMX6K/p1523565197000063 😺 |
| --Expicit binding - using methods like, call, apply and bind we can bind one thing to other. | ||
|
|
||
| 5. Why do we need super() in an extended class? | ||
| super keyword is used to pass any new attributes back to constructor of the parent. |
| function multiply(param1,param2){ | ||
| return param1 * param2; | ||
| } | ||
|
|
| 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! | ||
|
|
| // Question 1: Explain in your own words why the example below is a closure. | ||
|
|
||
| // Explanation: | ||
| //the example below is a closure because "internal" is not defined inside "nestedFunction" but we are still acessing it! |
| this.period = att.period; | ||
| } | ||
| } | ||
|
|
| length: '12m', | ||
| period: 'Late Cretaceious', | ||
| }); | ||
|
|
| length: '9m', | ||
| period: ' Late Jurassic', | ||
| }); | ||
|
|
| weight: '15kg', | ||
| length: '1.8m', | ||
| period: 'Late Cretaceious', | ||
| }); |
There was a problem hiding this comment.
👍 that is a lightweight Tyrannosaurus :)
| return "RAWERSRARARWERSARARARRRR!"; | ||
| } | ||
| console.log(tyrannosaurus.roar()); | ||
|
|
| const universities = []; | ||
| const universities = graduates.map(item => item.university); | ||
| console.log(universities) | ||
|
|
There was a problem hiding this comment.
let's not forgot to sort the array by alphabet
| const uniobj = graduates.filter(item => item.university.includes("Uni",0)); | ||
| const uni = uniobj.map(item => item.university); | ||
| console.log(uni); | ||
|
|
There was a problem hiding this comment.
Good, but how many universities contains "Uni"?
| let lowerCase = []; | ||
| let lowerCase = zooAnimals.map(item => item.animal_name.toLowerCase()); | ||
| console.log(lowerCase); | ||
|
|
| this.width = args.width; | ||
| this.height = args.height; | ||
| } | ||
|
|
| } | ||
|
|
||
|
|
||
|
|
| return 2 * (this.length * this.width + this.length * this.height + this.width * this.height); | ||
| } | ||
|
|
||
|
|
| // console.log(cuboid.surfaceArea()); // 130 | ||
| console.log(cuboid.volume()); // 100 | ||
| console.log(cuboid.surfaceArea()); // 130 | ||
|
|
| }); | ||
|
|
||
| console.log(cube.cubevolume()); // 100 | ||
| console.log(cube.cubesurface()); // 130 |
|
Samar, Self Study Questions[x] Answered all Challenges[x ] Objects [ x] Arrays [ x] Functions [ x] Prototypes [ x] Classes Good Habits[x ] Pull Request title is your first and last name (add any notes in the comment field) Clean and concise explanations. Good job! Keep up the good work! |


No description provided.