8 kyu
Add new item (collections are passed by reference)
894 of 6,511aryan-firouzian
Description:
Add an item to the list:
AddExtra method adds a new item to the list and returns the list. The new item can be any object, and it does not matter. (lets say you add an integer value, like 13)
In our test case we check to assure that the returned list has one more item than the input list. However the method needs some modification to pass this test.
P.S. You have to create a new list and add a new item to that. (This Kata is originally designed for C# language and it shows that adding a new item to the input list is not going to work, even though the parameter is passed by value, but the value is poining to the reference of list and any change on parameter will be seen by caller)
Fundamentals
Similar Kata:
Stats:
Created | Dec 13, 2015 |
Published | Dec 13, 2015 |
Warriors Trained | 10656 |
Total Skips | 268 |
Total Code Submissions | 26441 |
Total Times Completed | 6511 |
C# Completions | 894 |
Python Completions | 2720 |
Ruby Completions | 226 |
JavaScript Completions | 2864 |
COBOL Completions | 10 |
Total Stars | 59 |
% of votes with a positive feedback rating | 74% of 1148 |
Total "Very Satisfied" Votes | 733 |
Total "Somewhat Satisfied" Votes | 224 |
Total "Not Satisfied" Votes | 191 |
Total Rank Assessments | 17 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |