上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 468 下一页
摘要: Given an union of types and array of type pairs to replace ([[string, number], [Date, null]]), return a new union replaced with the type pairs. /* ___ 阅读全文
posted @ 2022-12-07 20:12 Zhentiw 阅读(15) 评论(0) 推荐(0) 编辑
摘要: Capitalize the key of the object, and if the value is an array, iterate through the objects in the array. /* _____________ Your Code Here ____________ 阅读全文
posted @ 2022-12-06 21:24 Zhentiw 阅读(20) 评论(0) 推荐(0) 编辑
摘要: You have a target object and a source array of objects. You need to copy property from source to target, if it has the same property as the source, yo 阅读全文
posted @ 2022-12-05 14:51 Zhentiw 阅读(16) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums and an integer target, return true if two numbers such that they add up to target. /* _____________ Your Code Here ___ 阅读全文
posted @ 2022-12-04 22:29 Zhentiw 阅读(14) 评论(0) 推荐(0) 编辑
摘要: The optimizing compiler optimizes for what it’s seen. If it sees something new, that’s problematic. Seleting properties has some strange implications 阅读全文
posted @ 2022-12-03 23:11 Zhentiw 阅读(54) 评论(0) 推荐(0) 编辑
摘要: Code: benchmark.js const { performance } = require('perf_hooks'); // SETUP 🏁 let iterations = 1e7; const a = 1; const b = 2; const add = (x, y) => x 阅读全文
posted @ 2022-12-03 22:46 Zhentiw 阅读(19) 评论(0) 推荐(0) 编辑
摘要: Get all possible paths that could be called by _.get (a lodash function) to get the value of an object type T1 = ObjectKeyPaths<{ name: string; age: n 阅读全文
posted @ 2022-12-03 20:40 Zhentiw 阅读(18) 评论(0) 推荐(0) 编辑
摘要: Implement BinaryToDecimal<S> which takes an exact string type S consisting 0 and 1 and returns an exact number type corresponding with S when S is reg 阅读全文
posted @ 2022-12-02 21:41 Zhentiw 阅读(29) 评论(0) 推荐(0) 编辑
摘要: Implement the type version of Lodash.intersection with a little difference. Intersection takes an Array T containing several arrays or any type elemen 阅读全文
posted @ 2022-12-01 16:26 Zhentiw 阅读(10) 评论(0) 推荐(0) 编辑
摘要: type RGB = [number, number, number] const palette: Record<'red' | 'blue' | 'green', string | RGB> = { red: [255, 0, 0], green: "#00ff00", blue: [0,0,2 阅读全文
posted @ 2022-11-30 15:53 Zhentiw 阅读(12) 评论(0) 推荐(0) 编辑
上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 468 下一页