Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ sum_
Function
sum_
recipes/JavaScript/579002_BaderOffer_Method/recipe-579002.js:235–239 ·
view source on GitHub ↗
(arr, key)
Source
from the content-addressed store, hash-verified
233
};
234
235
function
sum_(arr, key) {
236
if
(!arr.length)
237
return
0;
238
return
arr.map(key_(key)).reduce(
function
(a, b) {
return
a + b });
239
}
Callers
3
get_agreement_list_
Function · 0.85
mandate_splitting_
Function · 0.85
recipe-579002.js
File · 0.85
Calls
3
key_
Function · 0.85
reduce
Method · 0.45
map
Method · 0.45
Tested by
no test coverage detected