Skip to content

add sum-salaries solution #766

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

Closed
wants to merge 1 commit into from
Closed

add sum-salaries solution #766

wants to merge 1 commit into from

Conversation

l1un
Copy link
Contributor

@l1un l1un commented Jan 28, 2019

Added solution from sandbox and one-liner option using reduce.

@iliakan
Copy link
Member

iliakan commented Jan 29, 2019

Please remove extra indentation from inside ```.

Also, Object.values and reduce are explained at this point, you sure? :)

@l1un
Copy link
Contributor Author

l1un commented Jan 29, 2019

Please remove extra indentation from inside ```.

Ok sorry, I need to figure where my formatting is incorrect when doing these. I've tried to replicate the other example solutions exactly. It may be related to my env unix line endings? / vim / eslint / prettier ? maybe ? not sure. I'll look into it more soon and try again.

Also, Object.values and reduce are explained at this point, you sure? :)

Yes, Object.values, entries, etc. was in previous chapter (https://javascript.info/keys-values-entries) and used in the preexisting destructuring assignment example with the for.. of loop.

Also yes, reduce/reduce right is covered a few chapters back in the Array methods.. (https://javascript.info/array-methods)

@iliakan
Copy link
Member

iliakan commented Jan 29, 2019

Thanks, actually extra indent is not a problem, scripts handle it well.

But it's really unnecessary =)

@l1un
Copy link
Contributor Author

l1un commented Jan 29, 2019

Thanks, actually extra indent is not a problem, scripts handle it well.

But it's really unnecessary =)

Fixed it, and for moving forward... It was a md/eslint config lint-on-save setting used for an unrelated use-case and I also don't like the extra indentation in most cases. Here is the fixed: #772

@l1un l1un closed this Jan 29, 2019
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