上一页 1 2 3 4 5 6 7 8 9 ··· 41 下一页
摘要: function concurRequest(maxnum) { return new Promise((resolve, reject) => { let index = 0 let count = 0 const results = [] async function request() { c 阅读全文
posted @ 2024-08-02 11:34 howhy 阅读(27) 评论(0) 推荐(0)
摘要: function fun1(ss) { console.log(ss + "1") return 'b' } function fun11(ss) { console.log(ss + "11") return 'ab' } function fun12(ss) { console.log(ss + 阅读全文
posted @ 2024-07-30 13:52 howhy 阅读(22) 评论(0) 推荐(0)
摘要: function deepClone(value){ const map=new WeakMap() function _deepClone(value){ if(value null || typeof value !== 'object'){ return value } if(map.has( 阅读全文
posted @ 2024-07-29 17:42 howhy 阅读(20) 评论(0) 推荐(0)
摘要: names=['张三','李四','阿猫','王五','岳云鹏'] names.sort((a,b)=>a.localeCompare(b)) 阅读全文
posted @ 2024-07-29 16:34 howhy 阅读(21) 评论(0) 推荐(0)
摘要: class Person { constructor(name, age) { this.name = name this.age = age } } function creataOnlyOneCls(target) { let cls; return new Proxy(target, { co 阅读全文
posted @ 2024-07-26 16:21 howhy 阅读(27) 评论(0) 推荐(0)
摘要: function createFunOverLoad() { const funMap = new Map() console.log(funMap) const funOverLoad = function (...args) { const key = args.map(param => typ 阅读全文
posted @ 2024-07-26 15:47 howhy 阅读(23) 评论(0) 推荐(0)
摘要: const calculator = { count: 0, next() { return ++this.count }, double(a) { return a * 2 }, add(a, b) { return a + b } } calculator.add(2, 3) // functi 阅读全文
posted @ 2024-07-18 18:21 howhy 阅读(41) 评论(0) 推荐(0)
摘要: const customConfig = { a: 22, b: 33 } function config(config = {}) { const defaultConfig = { a: 12, b: 23, c: 'aa' } const finallyConfig = { ...defaul 阅读全文
posted @ 2024-07-18 18:02 howhy 阅读(30) 评论(0) 推荐(0)
摘要: const students = [ { name: 's1', age: 22, sex: 'female' }, { name: 's2', age: 22, sex: 'male' }, { name: 's3', age: 23, sex: 'female' }, { name: 's4', 阅读全文
posted @ 2024-07-18 16:35 howhy 阅读(19) 评论(0) 推荐(0)
摘要: const requestpromise = require("request-promise"); const crypto = require('crypto'); function md5(str) { const hash = crypto.createHash('md5'); hash.u 阅读全文
posted @ 2024-06-03 14:21 howhy 阅读(144) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 41 下一页