Skip to content

Commit

Permalink
написал функцию, преобразующую вид строки
Browse files Browse the repository at this point in the history
  • Loading branch information
Данейкин Илья Вячеславович authored and Данейкин Илья Вячеславович committed Oct 2, 2024
1 parent 7154c75 commit be52db2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions 3-module/3-task/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
function camelize(str) {
// ваш код...
}
let arr = str.split('-').map(function(word, index) {
return index === 0? word : word[0].toUpperCase() + word.slice(1);
})
return arr.join('');
}

0 comments on commit be52db2

Please sign in to comment.