GSG-G10 / GSG-G10/DevMonkeys-Ecommerce
Const and let
Open
review
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Since you are not going to change the value of the variable (reassign) you should use `const`
https://github.com/GSG-G10/DevMonkeys-Ecommerce/blob/0b47b4ec1f48ee4bd3270d6c49b4f9ce9c2a47b9/js/logic.js#L23-L26
and you should write more descriptive variables/arguments names so you can write this function in es6 to become
```js
const deleteItem = (products, item) => products.filter((elem) => elem.id !== item.id);
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.