摘要: const express = require('express') const app = express() app.use((req, res, next) => { console.log(req.query); //这里很关键的一句,表示发送的消息是以纯文本形式发送的 res.set('C 阅读全文
posted @ 2023-06-10 11:17 前端小菜鸡美哥 阅读(58) 评论(0) 推荐(0)
摘要: 第一种:for循环,也是最常见的 最简单的一种,也是使用频率最高的一种,虽然性能不弱,但仍有优化空间 const arr = [11, 22, 33, 44, 55, 66, 77, 88]; for (let i = 0; i < arr.length; i++) { console.log(ar 阅读全文
posted @ 2023-06-10 11:12 前端小菜鸡美哥 阅读(4116) 评论(0) 推荐(0)
摘要: 组合: (不考虑顺序,无重复) //测试用例 let dataArr = [1, 2, 3, 4, 5]; function combination(dataArr, remainNum, currentArr) { if (remainNum 0) { console.log(...current 阅读全文
posted @ 2023-06-10 10:38 前端小菜鸡美哥 阅读(66) 评论(0) 推荐(0)