-
-
Notifications
You must be signed in to change notification settings - Fork 155
WESTMIDLANDS | ITP-MAY-25 | AHMADEHSAS | SPRINT-2 | DATA GROUPS #756
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
base: main
Are you sure you want to change the base?
Conversation
…rray and passed the tests of given arrays.
…seNumber property.
…by join(\n) method.
It looks like there are a lot of files included here - from multiple sprints. Can I just confirm which ones you wanted reviewed? |
Subject: Request for Review of Sprinter-2 Folder
I hope this message finds you well. I would like to request a review of the
Sprinter-2 folder, as it is pertinent to my branch, Sprint-2.
Thank you for your attention to this matter.
*LonMcGregor* left a comment (CodeYourFuture/Module-Data-Groups#756)
… <#756 (comment)>
It looks like there are a lot of files included here - from multiple
sprints. Can I just confirm which ones you wanted reviewed?
—
Reply to this email directly, view it on GitHub
<#756 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BOYJJVAGCTH5O66MQ2LMQBL3NBLUFAVCNFSM6AAAAACDP5QJCWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCNZTHAZTMMBYHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I've reviewed sprint 2 now. If the sprint 1 files are not meant to be there, can you remove them from the pull request please? Also, can you fix the package-lock.json
file - if you didn't intentionally change that file, it should not have any changes comitted.
For sprint 2, you have made a good start, but I have some follow up questions for you to answer
// This means that we need to check if the property belongs to the object using hasownproperty whenever we loop through an object with the `for ... in` loop. | ||
|
||
for (const key in author) { | ||
if (author.hasOwnProperty(key)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are you using hasOwnProperty to do here?
${recipe}`); | ||
// Here we add `join("\n") to the ingredients array to log each ingredient in a new line. | ||
console.log( | ||
`${recipe.title} serves ${ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason you wrote the recipe.serves
variable over multiple lines?
|
||
// Given invalid parameters like an array | ||
// When passed to contains | ||
// Then it should return false or throw an error | ||
test("contains on an array returns false", () => { | ||
expect(contains([1, 2, 3], 4)).toBe(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you test for something like contains([1,2,3,4], "length")
?
|
||
// d) Explain why the current return value is different from the target output | ||
// because it returns the [key, value] of an object in reverse order [value,key] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this question was asking why the original output of this program was not what was expected (before you fixed it) - can you explain why you made the change you did and what the mistake was?
Learners, PR Template
Self checklist
Changelist:
Completed all the mandatory tasks.
Questions
Ask any questions you have for your reviewer.