Let's take a look at what the console has to offer for debugging purposes.
The current console methods and properties are:
["$$", "$x", "dir", "Dirxml", " values ", " profile ", " inspect ", " copy ", "clear", "Geteventlisteners", " $ ", " $ ", " $ ", "$ $", "$4", "$_"]
Let's take a look at the main uses of each method.
In general, the method we use to enter information is mainly used in the following four:
1, Console.log for the output of general information
2, Console.info for the output of informational information
3. Console.error for output error message
4, Console.warn for output warning information
To speak in a diagram:
6, Console.groupend end a set of output information
See you need to choose a different output method to use, if the above four methods together with the group and the GroupEnd method can be used to enter a variety of different forms of output information.
7, Console.assert the input expression to assert, only the expression is false, output the corresponding information to the console.
8, Console.count(This method is very practical OH) when you want to count the number of times the code is executed.
9, Console.dir (This method is I often use can not know how much more convenient than for in) directly to the DOM node in the structure of the DOM tree output, you can detail the method of object development and so on.
10, Console.time time to start. Console.timeend time is over (look at the picture below and you'll feel it in a moment)
11. Keys and values return the data that consists of all the property names of the incoming object, which returns an array of all the property values.
12.Console.table method
13. The Chrome console natively supports jquery-like selectors, meaning you can use $
the familiar CSS selector to select the DOM section.
14 . Use Console.profile and console.profileend together to view CPU usage related letters.
From:http://www.cnblogs.com/zhongxinwang/p/4122460.html
Usage of the "repost" Chrome console console