7 kyu
Array arithmetic
358appsincaps
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
Similar Kata:
Stats:
Created | Nov 13, 2015 |
Published | Nov 13, 2015 |
Warriors Trained | 907 |
Total Skips | 17 |
Total Code Submissions | 1388 |
Total Times Completed | 358 |
JavaScript Completions | 358 |
Total Stars | 8 |
% of votes with a positive feedback rating | 86% of 97 |
Total "Very Satisfied" Votes | 78 |
Total "Somewhat Satisfied" Votes | 10 |
Total "Not Satisfied" Votes | 9 |