You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The point of these assignments is to take your knowledge of JavaScript and start putting into practice the principles learned throughout JavaScript I.
MVP
Objects
To better understand objects, you really just need to write more of them. The objects.js file contains several challenges centered around a theme of interns starting at a new job. The Human Resources team needs information about the new hires. Use your new found object skills answer vital questions for HR.
Read the instructions found within the file carefully to finish the challenges.
Complete each challenge presented before moving on to Arrays.
Challenge One
Challenge Two
Challenge Three
Arrays
The arrays.js assignment takes us through a large data set of used cars. You have been asked to help a used car business with some customer requests based on their inventory. Use for loops and arrays to solve their problems.
Utilize the the array inventory to complete your challenges
You are not permitted to use map, reduce, or filter to solve these problems. Only use a basic for loop.
Complete each challenge presented before moving on to stretch.
Challenge One
Challenge Two
Challenge Three
Challenge Four
Challenge Five
Challenge Six
Stretch
Tasks
Arrow Function Syntax - Check out this awesome guide for ES6 arrow syntax. You will see more and more arrow functions as you progress deeper into JavaScript. Use the stretch-function-conversion.js file as a helper challenge to showcase some of the differences between ES5 and ES6 syntax.
Move on to tomorrow's content and start studying callbacks, write a few of your own to get the hang of it.
Look at array methods like .map(), .reduce(), .filter(). use them on the data in the arrays assignment to accomplish the same things you did with the ES5 for loop.
Great
You're demonstrating a solid understanding of objects and arrays here! Happy to see you did stretch as well! Well done!!
Requests for Improvement
I believe the intention of Objects Challenge 3 was to add the methods outside of the object. When you want to add a property to an object outside of the object itself, you can simply declare it and set its value, and its value can be set to a function.
Example: object.newProperty = function () { return or console.log something }
Furthermore, lines 83 and 86 currently log undefined, as you are attempting to console.log a console.log. Since your test is a console.log, then you'll want a return in the function itself.
Similar issue to above is occuring with your speak functions in the Objects stretch challenge, and the first Stretch Function Conversion challenge.
Nothing wrong with your code or logic, but on Arrays Challenge 2, how could you use the lastCar variable provided to make the function itself a little more readable? Hint: you don't have to leave it set to 0.
Rating: 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@abravebee