★ wanayoo — archive 1999 https://github.com/HowProgrammingWorks/Closure/pull/15Nouvelle recherche | Portail wanayoo
Skip to content
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

exercise #2 #15

Open
wants to merge 2 commits into
base: master
from
Open

exercise #2 #15

wants to merge 2 commits into from

Conversation

@RV8V
Copy link

@RV8V RV8V commented Jan 3, 2020

I changed 2-array.test cause it said my line had a length of 96. Maximum allowed was 80 and my solution was short.

RV8V added 2 commits Jan 3, 2020
fix
@@ -1,6 +1,6 @@
({
name: 'array',
length: [100, 200],
length: [80, 200],

This comment has been minimized.

@tshemsedinov

tshemsedinov Jan 3, 2020
Member

Don't change tests

@@ -1,5 +1,6 @@
'use strict';

const array = () => null;
const array = (a = [], f) =>

This comment has been minimized.

@tshemsedinov

tshemsedinov Jan 3, 2020
Member

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);

This comment has been minimized.

@tshemsedinov

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.