格式化输出的JSON字符串 // 格式化输出的JSON字符串 console.log(JSON.stringify({ alpha: 'A', beta: 'B' }, null, ' ')); 控制台打印的: