<html>
<head>
</head>
<body>
<div style="width: 10px; height: 20px; background: red"></div>
<div style="width: 10px; height: 20px; background: red"></div>
<div style="width: 10px; height: 20px; background: red"></div>
<script>
collection=[].map.call(document.querySelectorAll("div"), function(x){return x})
getIntWidth=function(x){return parseInt(x.style.width)}
sum=function(x, y){return x+y}
alert(
collection.map(getIntWidth).reduce(sum)
)
</script>
</body>
</html>