Assert: Throw some Infomation about FALSE(first option).
Clear: Equal shell command clear.
Count: Count Call frequency in Function, Option named Label.
Dir: tree version in browser console, VM show
typeof
value.Dirxml: tree version in browser console, not Compatiable in Node.js.
Error: show Error in browser console.(x icon and red background).
Group/GroupEnd: create a new Tree Structure in console, use groupEnd method to end this group.
Info/Debug: same like Log. Debug not support in Chrome.
Log: show Log in browser console.(normal background).
Warn: show Information in browser console.(! icon and yellow background).
Table: show Table Style in browser console, supported normal Array,construction Function,dyadic Array, Object Array and some ways.
Time/TimeEnd: create a timer to during on the Opertion, must have unique name.
TimeStamp: create a mark in Timeline tools in browser.
Trace: create a trace route in browser.
// example.14
foo();
function foo() {
function bar() {
console.trace();
}
bar();
}
Other:
- Format
for (var i=0; i<5; i++) {
console.log("Hello, %s. You've called me %d times.", "Bob", i+1);
}
console.log("I want to print a number:%d","string")
- Style
console.log("%cMy stylish message", "color: red; font-style: italic");
Quoto: