Use join instead of reduce

This commit is contained in:
Aya Morisawa 2018-12-24 17:02:03 +09:00
parent d8620187ec
commit 0938ea3964
No known key found for this signature in database
GPG Key ID: 3E64865D70D579F2
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
export function concat(xs: string[]): string {
return xs.reduce((a, b) => a + b, '');
return xs.join('');
}
export function capitalize(s: string): string {