上一页 1 ··· 81 82 83 84 85 86 87 88 89 ··· 494 下一页
摘要: A company has hired N interns to each join one of N different teams. Each intern has ranked their preferences for which teams they wish to join, and e 阅读全文
posted @ 2023-01-02 01:39 Zhentiw 阅读(125) 评论(0) 推荐(0)
摘要: Array.from() is a great way to chunk up arrays because of the secondary argument being a map function. const hugeArray = Array.from({length: 76}, (_, 阅读全文
posted @ 2022-12-25 20:21 Zhentiw 阅读(102) 评论(0) 推荐(0)
摘要: The Intl.Collator object enables language-sensitive string comparison. console.log(['Z', 'a', 'z', 'ä'].sort(new Intl.Collator('de').compare)); // exp 阅读全文
posted @ 2022-12-25 20:03 Zhentiw 阅读(74) 评论(0) 推荐(0)
摘要: Since arrays are objects, we can destructure their indexes to easily grab the first and last itmes const bikes = ['bianchi', 'miele', 'miyata', 'benot 阅读全文
posted @ 2022-12-25 19:59 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: For example, we have a type repersent currency: USD, value should be something like '$123', a string type with `$` and number. So let's say we make a 阅读全文
posted @ 2022-12-24 19:15 Zhentiw 阅读(63) 评论(0) 推荐(0)
摘要: Currying is the technique of converting a function that takes multiple arguments into a sequence of functions that each take a single argument. But in 阅读全文
posted @ 2022-12-23 15:48 Zhentiw 阅读(27) 评论(0) 推荐(0)
摘要: jest.mock('./filename', () => { const originalModule = jest.requireActual('./filename') return { ...originalModule, fnA: jest.fn(), fnB: (b: boolean): 阅读全文
posted @ 2022-12-22 16:06 Zhentiw 阅读(28) 评论(0) 推荐(0)
摘要: This challenge continues from 476 - Sum, it is recommended that you finish that one first, and modify your code based on it to start this challenge. I 阅读全文
posted @ 2022-12-22 15:50 Zhentiw 阅读(24) 评论(0) 推荐(0)
摘要: Implement a type `Sum<A, B>` that summing two non-negative integers and returns the sum as a string. Numbers can be specified as a string, number, or 阅读全文
posted @ 2022-12-21 22:41 Zhentiw 阅读(33) 评论(0) 推荐(0)
摘要: // Doesn't work import React from 'react' import { saveInfo } from './api' export default function App() { const [count, setCount] = React.useState(0) 阅读全文
posted @ 2022-12-21 16:11 Zhentiw 阅读(18) 评论(0) 推荐(0)
上一页 1 ··· 81 82 83 84 85 86 87 88 89 ··· 494 下一页