Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 1.61 KB

File metadata and controls

11 lines (8 loc) · 1.61 KB

Without medium #union #array

by Pineapple @Pineapple0919

Take the Challenge    简体中文

Implement the type version of Lodash.without, Without<T, U> takes an Array T, number or array U and returns an Array without the elements of U.

type Res = Without<[1, 2], 1>; // expected to be [2]
type Res1 = Without<[1, 2, 4, 1, 5], [1, 2]>; // expected to be [4, 5]
type Res2 = Without<[2, 3, 2, 3, 2, 3, 2, 3], [2, 3]>; // expected to be []

Back Share your Solutions Check out Solutions