beautify 1st part of the tutorial
This commit is contained in:
parent
e3dd2cedc0
commit
6444024a9d
327 changed files with 2358 additions and 1986 deletions
|
@ -16,7 +16,7 @@ var newStr = str[0].toUpperCase() + str.slice(1);
|
|||
//+ run
|
||||
function ucFirst(str) {
|
||||
// только пустая строка в логическом контексте даст false
|
||||
if (!str) return str;
|
||||
if (!str) return str;
|
||||
|
||||
return str[0].toUpperCase() + str.slice(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue