Skip to content

Commit 19e85f7

Browse files
author
Jin Xu
committed
course wesbos#9 learnt
1 parent c52b83f commit 19e85f7

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

09 - Dev Tools Domination/index-START.html

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

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

2223
// Interpolated
23-
24+
console.log('hello %s', 'shit');
25+
2426
// Styled
27+
console.log('%c hello shit', 'font-size: 20px;color: red');
2528

2629
// warning!
30+
console.warn('haha')
2731

2832
// Error :|
33+
console.error('haha')
2934

3035
// Info
31-
36+
console.info('haha')
3237
// Testing
38+
console.assert(1 === 2, 'that\'s wrong')
3339

3440
// clearing
41+
// console.clear();
3542

3643
// Viewing DOM Elements
37-
44+
console.dir(document.querySelector('p'));
3845
// Grouping together
46+
dogs.forEach(dog => {
47+
console.group(`${dog.name}`)
48+
console.log(`this is ${dog.name}`)
49+
console.log(`I'm ${dog.age} years old`)
50+
console.groupEnd(`${dog.name}`)
51+
})
3952

4053
// counting
54+
console.count('shit')
55+
console.count('shit')
56+
console.count('shit')
57+
console.count('shit')
4158

4259
// timing
60+
console.time('fetching');
61+
fetch('https://api.github.com/users/saury')
62+
.then(data => data.json())
63+
.then(data => {
64+
console.timeEnd('fetching');
65+
console.log(data);
66+
});
4367

4468
</script>
4569
</body>

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
6. [x] ~~Type Ahead~~
1313
7. [x] ~~Array Cardio, Day 2~~
1414
8. [x] ~~Fun with HTML5 Canvas~~
15-
9. [ ] Dev Tools Domination
15+
9. [x] ~~Dev Tools Domination~~
1616
10. [ ] Hold Shift and Check Checkboxes
1717
11. [ ] Custom Video Player
1818
12. [ ] Key Sequence Detection

0 commit comments

Comments
 (0)