ltbyce

Results 3 comments of ltbyce

只要知道牌的张数就能通过一个状态去解决 ``` function topic(arr) { let sortArr = [] let oriArr = [...arr].reverse() let length = arr.length let isOdd = arr.length % 2 === 0 ? false : true for...

### 就用Map加 JSON.stringify ``` function topic1 (arr) { let newArr = arr.map(el => (typeof el === 'object' ? JSON.stringify(el) : el)) let arrSet = new Set(newArr).values() return [...arrSet].map(el => {...