Skip to content

Test & Solution for #31.#99

Merged
yjlim5 merged 1 commit into
llipio:masterfrom
seemcat:mc9
Jun 15, 2017
Merged

Test & Solution for #31.#99
yjlim5 merged 1 commit into
llipio:masterfrom
seemcat:mc9

Conversation

@seemcat
Copy link
Copy Markdown
Contributor

@seemcat seemcat commented Jun 9, 2017

No description provided.

Comment thread test/31.js
expect(solution(['just'])).eql('just');
})
it.only('the longest string in [hi,hello,hola] is hello', () => {
expect(solution1(['hi','hello','hola'])).eql('hello');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of creating 5 literally duplicate test cases, could you just take advantage of the test cases already written?

Comment thread solutions/31.js Outdated
while(i < arr.length){
if (big.length < arr[i].length){
big = arr[i];
i++;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should only need one i++

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved. Thanks!

@yjlim5 yjlim5 merged commit 4b177b3 into llipio:master Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants