File tree Expand file tree Collapse file tree 1 file changed +33
-1
lines changed
09 - Dev Tools Domination Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change 1818 }
1919
2020 // Regular
21+ console . log ( 'hi' ) ;
2122
2223 // Interpolated
24+ console . log ( 'Hello I am a %s string!' , '💩' )
2325
2426 // Styled
27+ console . log (
28+ '%c I am some great text' ,
29+ 'font-size: 50px; background: red;'
30+ )
2531
2632 // warning!
33+ console . warn ( 'oh no!' ) ;
2734
2835 // Error :|
36+ console . error ( 'huge error' ) ;
2937
3038 // Info
39+ console . info ( 'insert fun fact here' )
3140
3241 // Testing
42+ console . assert ( 1 === 2 , 'that is wrong!' )
3343
3444 // clearing
45+ console . clear ( ) ;
3546
3647 // Viewing DOM Elements
48+ const paragraph = document . querySelector ( 'p' ) ;
49+ console . log ( paragraph ) ;
50+ console . dir ( paragraph ) ;
3751
3852 // Grouping together
53+ dogs . forEach ( dog => {
54+ console . groupCollapsed ( `${ dog . name } ` ) ;
55+ console . log ( `This is ${ dog . name } ` ) ;
56+ console . log ( `He is ${ dog . age } ` ) ;
57+ console . groupEnd ( `${ dog . name } ` ) ;
58+ } )
3959
4060 // counting
61+ console . count ( 'Wes' )
62+ console . count ( 'Wes' )
63+ console . count ( 'Wes' )
64+ console . count ( 'Wes' )
4165
4266 // timing
43-
67+ console . time ( 'fetching data' ) ;
68+ fetch ( 'https://api.github.com/users/wesbos' )
69+ . then ( data => data . json ( ) )
70+ . then ( data => {
71+ console . timeEnd ( 'fetching data' ) ;
72+ console . log ( data ) ;
73+ } )
74+
75+ console . table ( dogs ) ;
4476 </ script >
4577</ body >
4678</ html >
You can’t perform that action at this time.
0 commit comments