GSG-G10 / GSG-G10/DevMonkeys-Ecommerce

Const and let

Open
#40 1 comment 1 reaction 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.