JavaScript performance is bananas, a thread. Let's write a function to sum the values from a the 'val' property of each element in an array: function sum(arr) { let acc = 0; for (let i = 0; i < arr.length; i++) { acc += arr[i].val; } return acc; } 1/10

1 min read Original article โ†—

Post

Don't miss what's happening

People on X are the first to know.

Log inSign up