Skip to content

Commit

Permalink
laba 4 yeeeeah lmao
Browse files Browse the repository at this point in the history
  • Loading branch information
pahan committed Mar 20, 2022
1 parent 64792a8 commit 204c2ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lab3/1.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* 'я Вижу солнце' -> 'Я Вижу Солнце'
*/

String.prototype.replaceAt = function(index, replacement) {
return this.substring(0, index) + replacement + this.substring(index + replacement.length);
}

function capitalize(str) {
if (str.length) str = str.replaceAt(0, str.charAt(0).toUpperCase());
let step = 0;
Expand Down

0 comments on commit 204c2ca

Please sign in to comment.