<commit_before>function sum(nums) {
  var sum = 0;
  for (var i = 0; i < nums.length; ++i) {
    sum += Number(nums[i]);
  }
  return sum;
}

console.log(sum(process.argv.slice(2,process.argv.length)));<commit_msg>add their example<commit_after>// my way
function sum(nums) {
  var sum = 0;
  for (var i = 0; i < nums.length; ++i) {
    sum += Number(nums[i]);
  }
  return sum;
}

console.log(sum(process.argv.slice(2,process.argv.length)));


// their way
//
// var result = 0
// for (var i = 2; i < process.argv.length; i++)
//   result += Number(process.argv[i])
// console.log(result)

{'fraction_non_alphanumeric': 0.19830508474576272, 'fraction_numerical': 0.013559322033898305, 'mean_word_length': 3.2214285714285715, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3796168', 'n_tokens_mistral': 238, 'n_tokens_neox': 230, 'n_words': 53}