Conversation
|
|
||
| forEach` loops over each element in an array, but does not automatically create a new array; while map does create a new a array corresponsing to | ||
| each eelemnt | ||
|
|
| 2. What is the difference between a function and a method? | ||
|
|
||
| a method refers to a function within an object (an object's functions). | ||
|
|
| 5. Why do we need super() in an extended class? No newline at end of file | ||
|
|
||
| a combination of a function and the lexical environment within which that function was declared. | ||
|
|
|
|
||
| 5. Why do we need super() in an extended class? | ||
|
|
||
| to cause a child class to inherit the properties and methods of its parent class. No newline at end of file |
|
It's nice to see that you are committing frequently. You get a gold ⭐️ !! Glad to see you are getting comfortable with the Git and GitHub tools Looking ahead to the larger projects you'll be working on, I'd ❤️ to see your msgs conveying more information, more frequently. This habit will make you a better programmer! Any time you complete an assignment, a function, add a component, or try a new feature in your programs, if you make note of the updates by using Git commit messages, your Git history will tell the story of your software engineering 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 😺 |
| return `RAWERSRARARWERSARARARRRR!`; | ||
| } | ||
| } | ||
|
|
| length: '1.8m', | ||
| period: 'Late Cretaceious' | ||
| }); | ||
|
|
| universities.push(graduates[i].university); | ||
| } | ||
|
|
||
| console.log(universities) |
There was a problem hiding this comment.
Lets not forgot to sort by alphabet
| contactInfo[i] += ' ' + graduates[i].email; | ||
| } | ||
|
|
||
| console.log(contactInfo); |
| uni.push(graduates[i].university); | ||
| } | ||
| } | ||
|
|
|
|
||
| lowerCase = zooAnimals.map(animal => animal.animal_name.toLowerCase()); | ||
|
|
||
| console.log(lowerCase); |
| return accumulator + currentValue; | ||
| }, 0); | ||
|
|
||
| console.log(populationSum); No newline at end of file |
| function greeting(fName, lName) { | ||
| return `Hello ${fName} ${lName}, nice to meet you!`; | ||
| } | ||
|
|
| // Explanation: because we are calling a function on a variable outside the function in which the the variablw was declared. | ||
|
|
||
| // Question 2: Given the example below, what scope is the external variable in? | ||
| // global scope |
| */ | ||
|
|
||
| function CuboidMaker(props) { | ||
| this.length = props.length; |
| CuboidMaker.prototype.volume = function() { | ||
| return this.length * this.width * this.height; | ||
| }; | ||
|
|
| CuboidMaker.prototype.surfaceArea = function() { | ||
| return 2 * (this.length * this.width + this.length * this.height + this.width * this.height); | ||
| }; | ||
|
|
| width: 5, | ||
| height: 5 | ||
| }); | ||
|
|
| this.length = props.length; | ||
| this.width = props.width; | ||
| this.height = props.height; | ||
| } |
| volume() { | ||
| return this.length * this.width * this.height; | ||
| } | ||
| surfaceArea() { |
| length: 4, | ||
| width: 5, | ||
| height: 5 | ||
| }); |
| width: 4, | ||
| height: 4 | ||
| }); | ||
|
|
|
Sam, 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) Great job on your assignment. I like your clean concise explanations and code. |


No description provided.