在 Chrome Dev Tools 控制台中,有一个名为 table 的函数,如下所示:
所以我去了Command Line API Reference , 但在那里没有找到 table 。
有人知道它是什么和做什么吗?谢谢
最佳答案
我只能推测它是一个尚未记录的模拟实现 Firebug Console API method :
console.table(data[, columns])
Allows to log provided data using tabular layout. The method takes one required parameter that represents table-like data (array of arrays or list of objects). The optional columns parameter can be used to specify columns and/or properties to be logged (see more at softwareishard.com).
在最初的问题之后一段时间,它是 finally documented :
table(data[, columns])
Log object data with table by passing in a data object in with optional column headings
关于javascript - Chrome 命令行 API 中的 table() 是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19981445/