Skip to content

Commit d6dc666

Browse files
committed
proshu proverit 3.3
1 parent e5ac224 commit d6dc666

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

3-module/3-task/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
function camelize(str) {
2-
// ваш код...
3-
}
2+
return str
3+
.split('-')
4+
.map((word, index) =>
5+
index === 0 ? word : word[0].toUpperCase() + word.slice(1)
6+
)
7+
.join('');
8+
}

0 commit comments

Comments
 (0)