Skip to content

Commit 05b35f4

Browse files
committed
adding script wesbos#9
1 parent efacfa7 commit 05b35f4

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

09 - Dev Tools Domination/index-START.html

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,68 @@
1818
}
1919

2020
// Regular
21+
console.log('hello');
2122

2223
// Interpolated
24+
console.log('hello I am a %s string', 'Interpolated');
2325

2426
// Styled
27+
console.log('%c hello I am a styled string', 'font-size:50px');
2528

2629
// warning!
30+
console.warn('I am a warning string');
2731

2832
// Error :|
33+
console.error('I am an error string');
2934

3035
// Info
36+
console.info('I am an info string');
3137

3238
// Testing
39+
const p = document.querySelector('p');
40+
41+
console.assert(p.classList.contains('ouch'), 'This is the error message');
3342

3443
// clearing
44+
console.clear();
3545

3646
// Viewing DOM Elements
47+
console.dir(p);
3748

3849
// Grouping together
50+
console.clear();
51+
dogs.forEach(dog => {
52+
console.groupCollapsed(`${dog.name}`);
53+
console.log(`This is ${dog.name}`);
54+
console.log(`${dog.name} is ${dog.age} years old`);
55+
console.log(`${dog.name} is ${dog.age * 7} dog years old`);
56+
console.groupEnd(`${dog.name}`);
57+
})
3958

4059
// counting
60+
console.count('Josh');
61+
console.count('Josh');
62+
console.count('Josh');
63+
console.count('Josh');
64+
console.count('Wes');
65+
console.count('Josh');
66+
console.count('Josh');
67+
console.count('Josh');
68+
console.count('Wes');
69+
console.count('Wes');
4170

4271
// timing
72+
console.time('fetching data');
73+
fetch('https://api.github.com/users/watson6982')
74+
.then(date => date.json())
75+
.then(data => {
76+
console.timeEnd('fetching data');
77+
console.log(data);
78+
});
79+
80+
81+
console.table(dogs);
82+
4383

4484
</script>
4585
</body>

0 commit comments

Comments
 (0)