en.javascript.info/1-js/4-data-structures/8-array-methods/1-camelcase/task.md
2016-03-21 10:16:55 +03:00

19 lines
446 B
Markdown

importance: 5
---
# Translate border-left-width to borderLeftWidth
Write the function `camelize(str)` that changes dash-separated words like "my-short-string" into camel-cased "myShortString".
That is: removes all dashes, each word after dash becomes uppercased.
Examples:
```js
camelize("background-color") == 'backgroundColor';
camelize("list-style-image") == 'listStyleImage';
camelize("-webkit-transition") == 'WebkitTransition';
```