Skip to content

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.

({
name: 'array',
length: [100, 200],
length: [80, 200],
Copy link
Member

Choose a reason for hiding this comment

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

Don't change tests

'use strict';

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

Choose a reason for hiding this comment

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

Don't use arguments to declare local scope variables


const array = () => null;
const array = (a = [], f) =>
(f = i => a[i], f.push = s => a.push(s), f.pop = () => a.pop(), f);
Copy link
Member

Choose a reason for hiding this comment

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants