[Javascript] Logging Pretty-Printing Tabular Data to the Console
2016-05-17 21:21
495 查看
Learn how to use console.table to render arrays and objects in a tabular format for easy scanning over the values. We'll create some mock data and then render it to the log in various ways to explore console.table's API.
function Character(name, power){ this.name = name; this.power = power; } var buffy = new Character("buffy", "1"); var joe = new Character("joe", "2"); var john = new Character("john", "3"); var chars = [buffy, joe, john]; console.table(chars); var chars= { buffy, joe, john } console.table(chars); console.table(chars, ["power"]) console.table(chars, []);
相关文章推荐
- Effective JavaScript :第四章
- Jsp小案例——输出当前系统时间
- javascript第九天
- jsp:useBean标准动作
- bzoj1149/2895 [JSOI2009]球队收益
- js设置radio选中 【转】
- JavaScript面向对象
- javascript需要知道的1
- 解析js中的call
- javascript的几种继承方式
- 表单验证插件Validate.js的使用
- Javascript 面向对象编程(一):封装
- jsp一句话
- Javascript面向对象编程(二):构造函数的继承
- js中的this关键字详解
- jsp 前后台值传递
- jsp编码过程
- 算是学完了《Servlet&JSP学习笔记》,立此存照
- jsoncpp解析拼装数组
- js学习六-闭包