Chrome Console Cheatsheet

Web

Usage

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Show object or value
window.console

# Log the value
console.log('Hellow ' + str_world);
console.warn('yellow exquotation mark')
console.error('red cross error');

# Show object details
console.dir(window)

# Assertion
console.assert(true && fasle)

# Clear
console.clear()

# Table
console.table( [{col1: "00", col2: "01"}, {col1:"10", col2:"11"}] );

# Time
console.time('timeTag');
doSomething();
console.timeEnd('timeTag');

# Group
console.group('functionDebuging');
console.log('log');
console.groupEnd('functionDebuging');