GSG-G10 / GSG-G10/DevMonkeys-Ecommerce
Arrow function and Consistency
Open
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.