object destructure
Open
- Dominant language
- HTML
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
* use [object destructure](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) to access object properties
https://github.com/GSG-G10/Watch-Store/blob/860921c81a5ffc1e9d3981d9bc804e0b7a569c23/scripts/dom.js#L103-L113
```
const totalCost=({price})=>{
const cardCost=localStorage.getItem('totalCost');
if(cardCost){
cardCost = +cardCost; // shortcut convert to int
localStorage.setItem("totalCost",cardCost +price)
}else{
localStorage.setItem("totalCost",price);
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.