London | 26-ITP-May | Edina Kurdi | Sprint 2 | Coursework - #1422
London | 26-ITP-May | Edina Kurdi | Sprint 2 | Coursework#1422edinakurdi wants to merge 26 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
4 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| console.log(Object.values(author)); | ||
| // for (const value of author) { | ||
| // console.log(value); | ||
| // } |
There was a problem hiding this comment.
A good workaround to print the values of the object.
Question - how could the for loop on lines 21 - 23 be changed (to a different loop for example) to achieve the same effect?
There was a problem hiding this comment.
Created an alternative using a loop
There was a problem hiding this comment.
Good refactor- I was also thinking of a for in loop, if we changed line 21 to a for in you'd have a direct way of printing the values in a readable way
for (const key in author){
console.log(author[key])
}
Poonam-raj
left a comment
There was a problem hiding this comment.
Few comments, slight amendments/refactors or explanations needed - take a look, nice work here though, good use of methods and testing throughout
…r object using a loop
| expect(tally(["a", "a", "a"])).toEqual({ a: 3 }); | ||
| }); | ||
| }); | ||
| describe("when given an array with duplicate items", () => { |
There was a problem hiding this comment.
Avoid having two describe blocks with the same text (this is the same as line 31)
Poonam-raj
left a comment
There was a problem hiding this comment.
Great work - I spotted one describe block that needs correcting but other than that it looks great - thanks for all the corrections
Learners, PR Template
Self checklist
Changelist
Data Groups - Sprint 2