摘要: json.parse 和 json.stringify json.stringify let res = {name:'测试',age:10}; let result = JSON.stringify(res) console.log(result) // 输出: '{"name":"测试","ag 阅读全文
posted @ 2021-11-18 14:47 飞鸟和蝉- 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 生成[0,n]范围内的随机整数 const n = 10 let res = Math.floor(Math.random()*n) console.log(res) 生成[min,max]范围内的随机整数 const min = 90, max = 100; let res = Math.floo 阅读全文
posted @ 2021-11-18 13:25 飞鸟和蝉- 阅读(125) 评论(0) 推荐(0) 编辑