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, []);

[Javascript] Logging Pretty-Printing Tabular Data to the Console的更多相关文章

  1. Populating Tabular Data Block Manually Using Cursor in Oracle Forms

    Suppose you want to populate a non-database data block with records manually in Oracle forms. This t ...

  2. Create Stacked Canvas to Scroll Horizontal Tabular Data Blocks In Oracle Forms

    In this tutorial you will learn to create horizontal scrollable tabular or detail data block by usin ...

  3. [Javascript] Web APIs: Persisting browser data with window.localStorage

    Local Storage is a native JavaScript Web API that makes it easy to store and persist data (as key-va ...

  4. 集成Javascript Logging on MVC or Core

    ASP.NET Core provides us a rich Logging APIs which have a set of logger providers including: Console ...

  5. [Javascrip] Logging Timing Data to the Console

    Learn to use console.time with console.timeEnd to get accurate timings of operations in javascript. ...

  6. javaScript tips —— 标签上的data属性

    HTML5规定可以为元素添加非标准型的属性,只需添加前缀data-,这些属性可以随意添加,随意命名,目的是为元素提供与渲染无关的信息,或提供语义信息. 传统获取方式 'getAttribute' da ...

  7. pug.compile() will compile the Pug source code into a JavaScript function that takes a data object (called “locals”) as an argument.

    Getting Started – Pug https://pugjs.org/api/getting-started.html GitHub - Tencent/wepy: 小程序组件化开发框架 h ...

  8. AngularJS Tabular Data with Edit/Update/Delete

    效果 首先,我们先建立一些数据,当然你可以从你任何地方读出你的数据 var app = angular.module('plunker', ['ui.bootstrap']); app.control ...

  9. [Javascript Crocks] Understand the Maybe Data Type

    In this lesson, we’ll get started with the Maybe type. We’ll look at the underlying Just and Nothing ...

随机推荐

  1. laravel4通过控制视图模板路劲来动态切换主题

    通过控制视图模板路劲来动态切换主题 App::before(function($request) { $paths = Terminal::isMobile() ? array(__dir__.'/v ...

  2. Getopt::Long 模块的简单使用

    用法简介 1.带值参数传入程序内部 ※参数类型:整数, 浮点数, 字串 GetOptions( 'tag=s' => \$tag ); ‘=’表示此参数一定要有参数值, 若改用’:'代替表示参数 ...

  3. 15_RHEL7挂载NTFS分区

    1.下载ntfs-3g wget https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2015.3.14.tgz 2.安装 tar -zxvf ntfs-3 ...

  4. pojo和JavaBean的区别

    javabean可以处理业务,pojo不可以. pojo就是get 和set 例如: Student{ id; name; get();... set();...} javabean可以实现业务逻辑 ...

  5. PHP下编码转换函数mb_convert_encoding与iconv的使用说明

    mb_convert_encoding这个函数是用来转换编码的. 不过英文一般不会存在编码问题,只有中文数据才会有这个问题.比如你用Zend Studio或Editplus写程序时,用的是gbk编码, ...

  6. PHP第一课笔记

    打算以后学习PHP,花3个月时间学会它,自己为自己加油.每天坚持学习,第一天感觉良好,没开始写,所以不敢觉难,在难也学,加油,me!! PHP笔记记录(2014.7.27) ★web开发的介绍 1.动 ...

  7. 那些年被我坑过的Python——道阻且长(第五章实用模块讲解)

    random模块 我的随机验证吗程序: 首先保证了字母和数字出现的概率是50% VS 50%,其次是可以订制输出多少位 def Captcha(size): Captcha_list = [] for ...

  8. 一定要记住这20种PS技术!!!会让你的照片美的不行!!!

    一种简单的数码照片后期润饰 1 打开图片,执行色像/饱和度(-40)降低饱和度. 2 新建一图层,将图层模式改为柔光,用画笔工具将需要润饰的部分画几下,这里可以利用色板方便的提取颜色 3 图片色彩过渡 ...

  9. linux中硬盘及网卡的表示方法

    Linux中的所有设备均表示为/dev下的一个文件,各种IDE设备分配一个由hd前缀组成的文件:而对于各种SCSI设备,则分配了一个由sd前缀组成的文件,例如: IDE0接口上的主盘成为/dev/hd ...

  10. 应用Oracle(解锁内置用户)

    解锁Oracle内置用户scott,密码默认为tiger. 系统管理员身份登录 cmd中, sqlplus / as sysdba 解除锁定 alter user scott account unlo ...