JSFiddle - React, Tailwind, and code Playground

by Anik Islam Abhi

JavaScript

var numSum = function(set) {
  var totalValue = 0;
  for (i = 0; i < set.length; i++) {
    totalValue += set[i];
  }
  return totalValue;
}
console.log(numSum([1, 2, 3, 4]));