7 kyu

Array arithmetic

Description:

Enable arithmetic operations on arrays, where the value of an array is given by the sum of its elements. Examples:

[1,2,3] + 4 = 10
[1,1,1] - 3 = 0
['a','b'] + 'c' = 'abc'

PS: Due to intrinsic uncertainty of empty arrays, in this kata an empty array is treated as 0. For hints see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf

Arrays
Fundamentals

Stats:

CreatedNov 13, 2015
PublishedNov 13, 2015
Warriors Trained907
Total Skips17
Total Code Submissions1388
Total Times Completed358
JavaScript Completions358
Total Stars8
% of votes with a positive feedback rating86% of 97
Total "Very Satisfied" Votes78
Total "Somewhat Satisfied" Votes10
Total "Not Satisfied" Votes9
Ad
Contributors
  • appsincaps Avatar
  • myjinxin2015 Avatar
Ad