1// (param1, param2, paramN) => expression
2
3// ES5
4var multiplyES5 = function(x, y) {
5 return x * y;
6};
7
8// ES6
9const multiplyES6 = (x, y) => { return x * y };
10
1function editInLocalStorage(value, id) {
2 let listItem = getLocalStorage();
3 listItem = listItem.filter((item) => {
4 if (item.id === id) {
5 item.value = value;
6 }
7 return item;
8 });
9}