Skip to content

Commit 36874a9

Browse files
committed
finished day 9
1 parent 8f9ac76 commit 36874a9

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

09 - Dev Tools Domination/index-START.html

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,77 @@
1919

2020
// Regular
2121

22+
console.log('Hi!');
23+
2224
// Interpolated
2325

26+
console.log('Hello I am a %s string!', 'poopy')
27+
2428
// Styled
2529

30+
// console.log('%c styled text? what is that?', 'font-size:30px');
31+
2632
// warning!
2733

34+
console.warn('whoopsie');
35+
2836
// Error :|
2937

38+
console.error('this is really bad')
39+
3040
// Info
3141

42+
console.info('birds fly so high')
43+
3244
// Testing
3345

46+
// displays when the first argument passed is not true.
47+
48+
const para = document.querySelector('p');
49+
50+
console.assert(para.classList.contains('big-class'), 'Whoops no big-class found')
51+
3452
// clearing
3553

54+
// console.clear();
55+
3656
// Viewing DOM Elements
57+
// this lets you view the dom element
58+
console.log(para);
59+
// console.dir lets you open up the element to view it's properties.
60+
console.dir(para);
3761

3862
// Grouping together
3963

64+
dogs.forEach(dog => {
65+
//
66+
// console.groupCollapsed(dog.name);
67+
console.group(dog.name)
68+
console.log('dog name is', dog.name);
69+
console.log('dog age is', dog.age, 'dog name is', dog.name)
70+
console.groupEnd(dog.name);
71+
})
72+
4073
// counting
74+
// will count how many times something is called
75+
console.count('Joey')
76+
console.count('Joey')
77+
console.count('Joey')
78+
console.count('Joey')
79+
console.count('Arvin')
80+
console.count('Arvin')
81+
4182

4283
// timing
4384

85+
console.time('fetching data');
86+
fetch('https://api.github.com/users/josamuel')
87+
.then(data => data.json())
88+
.then(data => {
89+
console.timeEnd('fetching data')
90+
console.log(data);
91+
})
92+
4493
</script>
4594
</body>
4695
</html>

0 commit comments

Comments
 (0)