Jianjie
Jianjie
> ```ts > // your answers > type Includes = { > [P in T[number]]: true > }[U] extends true ? true : false; > ``` You are absolutely genius!...
let arr = []; let i = 0; // 生成2~32随机数 function span () { let num = Math.floor(Math.random() * 31) + 2; return num; } function arrRes () { let...
> 我的核心思想是使用 `split`,假设未匹配到返回`-1`: > > ```js > let findIndex = (S, T) => { > if (!T.length || T.length > S.length) return -1 // T 为空字符串或 T 的长度大于 S 均直接返回-1...