Answers for "convert function to fat arrow"

2

js anonymous function es6

// (param1, param2, paramN) => expression

// ES5
var multiplyES5 = function(x, y) {
  return x * y;
};

// ES6
const multiplyES6 = (x, y) => { return x * y };
Posted by: Guest on July-20-2020
2

how to make javascript function consise

multiplyfunc = (a, b) => { return a * b; }
Posted by: Guest on April-04-2020
0

convert function to fat arrow

function editInLocalStorage(value, id) {
    let listItem = getLocalStorage();
    listItem = listItem.filter((item) => {
        if (item.id === id) {
            item.value = value;
        }
        return item;
    });
}
Posted by: Guest on July-31-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language