beautify 1st part of the tutorial
This commit is contained in:
parent
e3dd2cedc0
commit
6444024a9d
327 changed files with 2358 additions and 1986 deletions
|
@ -11,7 +11,7 @@
|
|||
function camelize(str) {
|
||||
var arr = str.split('-');
|
||||
|
||||
for(var i=1; i<arr.length; i++) {
|
||||
for (var i = 1; i < arr.length; i++) {
|
||||
// преобразовать: первый символ с большой буквы
|
||||
arr[i] = arr[i].charAt(0).toUpperCase() + arr[i].slice(1);
|
||||
}
|
||||
|
@ -19,8 +19,8 @@ function camelize(str) {
|
|||
return arr.join('');
|
||||
}
|
||||
|
||||
alert( camelize("background-color")); // backgroundColor
|
||||
alert( camelize("list-style-image") ); // listStyleImage
|
||||
alert( camelize("background-color") ); // backgroundColor
|
||||
alert( camelize("list-style-image") ); // listStyleImage
|
||||
alert( camelize("-webkit-transition") ); // WebkitTransition
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue