GSG-G10 / GSG-G10/DevMonkeys-Ecommerce

Arrow function and Consistency

Open
#39 0 comments 1 reaction 0 assignees View on GitHub
enhancement review
Dominant language
JavaScript
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

For consistency purposes, you should stick to one way of writing variables names, functions names, CSS classes and write in one version of ECMA script es5 or es6

https://github.com/GSG-G10/DevMonkeys-Ecommerce/blob/0b47b4ec1f48ee4bd3270d6c49b4f9ce9c2a47b9/js/logic.js#L18-L20

and since your function does only one job which is returning something In one line, you can write this function like this

```js
const filterByCategory = (name) => products.filter((item) => item.category === name );
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.