Skip to content

Commit 6c9eac2

Browse files
committed
9th exercise done
1 parent 847cff9 commit 6c9eac2

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

09 - Dev Tools Domination/index-START.html

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

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

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

2426
// Styled
27+
console.log('%c I am some great text', 'font-size: 20px; text-shadow: 5px 5px 0 blue');
2528

2629
// warning!
30+
console.warn('Uh oh');
2731

2832
// Error :|
33+
console.error('Oh nooooo');
2934

3035
// Info
36+
console.info('Crocodiles eat 3-4 people per year');
3137

3238
// Testing
39+
const p = document.querySelector('p');
40+
console.assert(p.classList.contains('ouch'), 'That is wrong!');
3341

3442
// clearing
43+
console.clear();
3544

3645
// Viewing DOM Elements
46+
console.log(p);
47+
console.dir(p);
48+
49+
console.clear();
3750

3851
// Grouping together
52+
dogs.forEach(dog => {
53+
// console.group(dog.name);
54+
console.groupCollapsed(dog.name);
55+
console.log(`This is ${dog.name}`);
56+
console.log(`${dog.name} is ${dog.age} years old`);
57+
console.log(`${dog.name} is ${dog.age * 7} dog years old` );
58+
console.groupEnd(dog.name);
59+
});
3960

4061
// counting
62+
console.count('Sean');
63+
console.count('Sean');
64+
console.count('Sean');
65+
console.count('Sean');
66+
console.count('Sean');
67+
68+
console.clear();
4169

4270
// timing
71+
console.time('fetching data');
72+
fetch('https://api.github.com/users/samdec11')
73+
.then(data => data.json())
74+
.then(data => {
75+
console.timeEnd('fetching data');
76+
console.log(data);
77+
});
78+
79+
// tables
80+
console.table(dogs);
4381

4482
</script>
4583
</body>

0 commit comments

Comments
 (0)