1. JSON.stringify() => JavaScript 对象或值转换为 JSON 字符串
console.log(JSON.stringify({ x: 5, y: 6 }));
// Expected output: '{"x":5,"y":6}'
2. JSON.parse() = > 方法将 JSON 字符串转换为 JavaScript 对象
const json = '{"result":true, "count":42}';
const obj = JSON.parse(json);
console.log(obj.count,obj.result);
// Expected output: 42,:true
3. vue退出登录清除cookie
重要::::: 工作常用,作为笔记
于 2024-01-08 12:24:06 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)