-
-
Notifications
You must be signed in to change notification settings - Fork 147
Glasgow | ITP MAY | MIRABELLE MORAH | Module Data Groups | Sprint-2 #587
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
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.
Good solutions to this sprint. You are complete with this sprint
expect(contains(undefined, "a")).toBe(false); | ||
expect(contains(42, "a")).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.
Good tests
expect(parseQueryString("name=John%20Doe&city=New%20York")).toEqual({ | ||
name: "John Doe", | ||
city: "New York", | ||
}); |
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.
Good test cases
const counts = {}; | ||
for (const item of list) { | ||
counts[item] = (counts[item] || 0) + 1; | ||
} |
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.
This is a clever and quick way of initialising the object
|
||
// d) Explain why the current return value is different from the target output | ||
|
||
// ... The current implementation incorrectly assigns the value to the key property of invertedObj instead of using the value as a key in invertedObj. fixed by using invertedObj[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.
Good explanations
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'm grateful and thank you
Learners, PR Template
Self checklist
Changelist
Created tests
Questions
liN