console.log

console.log("小技巧");
console.log("%c小技巧","color:red");
console.log("%c小技巧","color:green");
console.log("%c小技巧","color:#cf6161");
console.log("%c小技巧","color:red;background:#000");
console.log("%c小技巧","color: blue; font-size: 20px"); 

console.table

var arr= [{ num: "1",age:"10",name:"小明"},
         { num: "2",age:"15",name:"小白"}, 
         { num: "3",age:"20",name:"小红"}];
console.table(arr); //打印json 数据
上一篇 下一篇