Use join instead of reduce
This commit is contained in:
parent
d8620187ec
commit
0938ea3964
|
@ -1,5 +1,5 @@
|
||||||
export function concat(xs: string[]): string {
|
export function concat(xs: string[]): string {
|
||||||
return xs.reduce((a, b) => a + b, '');
|
return xs.join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
export function capitalize(s: string): string {
|
export function capitalize(s: string): string {
|
||||||
|
|
Loading…
Reference in New Issue