Comment on Anon admits they were wrong

<- View Parent
sugar_in_your_tea@sh.itjust.works ⁨3⁩ ⁨weeks⁩ ago

Modern JavaScript style recommends using arrow functions for anything that doesn’t need a context. Consider adjusting your code to the arrow function syntax:

const addNumbers = (a, b) => a + b;

Not only is this shorter syntax, it also gives you the benefits of a constant function. You can use it the same way you did in your existing code:

console.log(addNumbers(3, 5));  // Outputs: 8

For more JavaScript style suggestions, reply with more code.

source
Sort:hotnewtop