Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 1.43 KB

File metadata and controls

13 lines (9 loc) · 1.43 KB

Join medium #array

by Pineapple @Pineapple0919

Take the Challenge

Implement the type version of Array.join, Join<T, U> takes an Array T, string or number U and returns the Array T with U stitching up.

type Res = Join<["a", "p", "p", "l", "e"], "-">; // expected to be 'a-p-p-l-e'
type Res1 = Join<["Hello", "World"], " ">; // expected to be 'Hello World'
type Res2 = Join<["2", "2", "2"], 1>; // expected to be '21212'
type Res3 = Join<["o"], "u">; // expected to be 'o'

Back Share your Solutions Check out Solutions