Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upexercise #2 #15
Open
exercise #2 #15
Conversation
| @@ -1,6 +1,6 @@ | |||
| ({ | |||
| name: 'array', | |||
| length: [100, 200], | |||
| length: [80, 200], | |||
tshemsedinov
Jan 3, 2020
Member
Don't change tests
Don't change tests
| @@ -1,5 +1,6 @@ | |||
| 'use strict'; | |||
|
|
|||
| const array = () => null; | |||
| const array = (a = [], f) => | |||
tshemsedinov
Jan 3, 2020
Member
Don't use arguments to declare local scope variables
Don't use arguments to declare local scope variables
| @@ -1,5 +1,6 @@ | |||
| 'use strict'; | |||
|
|
|||
| const array = () => null; | |||
| const array = (a = [], f) => | |||
| (f = i => a[i], f.push = s => a.push(s), f.pop = () => a.pop(), f); | |||
tshemsedinov
Jan 3, 2020
Member
Cryptic code. Rewrite as a block of code, for better reading. Because this function is not in function-programming style, it uses mixins and mutable arrays, so it is not good idea to write it in a functional-style.
Cryptic code. Rewrite as a block of code, for better reading. Because this function is not in function-programming style, it uses mixins and mutable arrays, so it is not good idea to write it in a functional-style.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I changed 2-array.test cause it said my line had a length of 96. Maximum allowed was 80 and my solution was short.