7 kyu
Format With
263 of 264joh_pot
Description:
Write
String.prototype.formatWith = function () {}
that takes in a list of arguments and formats the string based off these arguments and indices.
For example:
'Hello {0}'.formatWith('Codewars') === 'Hello Codewars'
'{0} + {0} = {1}'.formatWith('1','2') === '1 + 1 = 2'
'Testing {1}'.formatWith('kata') === 'Testing {1}' // there is no arguments at position 1
Strings
Fundamentals
Similar Kata:
Stats:
Created | Feb 2, 2017 |
Published | Feb 2, 2017 |
Warriors Trained | 619 |
Total Skips | 6 |
Total Code Submissions | 769 |
Total Times Completed | 264 |
JavaScript Completions | 263 |
Total Stars | 11 |
% of votes with a positive feedback rating | 94% of 104 |
Total "Very Satisfied" Votes | 93 |
Total "Somewhat Satisfied" Votes | 9 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 11 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |