Skip to content

Instantly share code, notes, and snippets.

@evgeniyworkbel
Created November 18, 2021 19:42
Show Gist options
  • Save evgeniyworkbel/3c5dbfaaf96b2abe12e8f368bb78c2d5 to your computer and use it in GitHub Desktop.
Save evgeniyworkbel/3c5dbfaaf96b2abe12e8f368bb78c2d5 to your computer and use it in GitHub Desktop.
Подготов. курс JS (code-basics.ru)
// BEGIN (write your solution here)
const capitalize = (str) => str.slice(0, 1).toUpperCase() + str.slice(1);
// END
export default capitalize;
// BEGIN
const capitalize = (text) => `${text[0].toUpperCase()}${text.slice(1)}`;
// END
export default capitalize;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment