Visitar URL original
Lesson 9 complete. · wesbos/JavaScript30@41b001e · GitHub
Skip to content

Commit 41b001e

Browse files
committed
Lesson 9 complete.
1 parent d34a307 commit 41b001e

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

‎09 - Dev Tools Domination/index-START.html‎

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

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

2223
// Interpolated
24+
console.log('Hello %s', '🌐');
2325

2426
// Styled
27+
console.log('%c Code is stylish', 'color: red, background: blue');
2528

2629
// warning!
30+
console.warn('you shouldn\'t be doing this');
2731

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

3035
// Info
36+
console.info('This is informative');
3137

3238
// Testing
39+
console.assert('1' === 1, 'not equal!');
3340

3441
// clearing
42+
//console.clear();
3543

3644
// Viewing DOM Elements
45+
const p = document.querySelector('p');
46+
console.dir(p);
3747

3848
// Grouping together
49+
dogs.forEach(dog => {
50+
console.group(`${dog.name}`);
51+
console.log(`This is ${dog.name}`);
52+
console.log(`${dog.name} is ${dog.age} years old`);
53+
console.groupEnd();
54+
})
3955

4056
// counting
57+
console.count('Loki');
58+
console.count('Loki');
59+
console.count('Keebler');
60+
console.count('Loki');
61+
console.count('Loki');
4162

4263
// timing
64+
console.time('Fetching Data');
65+
fetch('https://api.github.com/users/zivi')
66+
.then(data => data.json)
67+
.then(data => {
68+
console.timeEnd('fetching data');
69+
console.log(data);
70+
})
4371

4472
</script>
4573
</body>

0 commit comments

Comments
 (0)