Skip to content

Commit 970852a

Browse files
author
=
committed
JS30 wesbos#9 completed
1 parent a96b39b commit 970852a

1 file changed

Lines changed: 35 additions & 3 deletions

File tree

09 - Dev Tools Domination/index-START.html

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,61 @@
1818
}
1919

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

2223
// Interpolated
24+
console.log(`Hi ${dogs[0].name},how's you?`);
2325

2426
// Styled
25-
27+
console.log('%c hey there,Kaise ho?','font-size:50px; background-color:red; text-shadow:10px 0 blue');
28+
2629
// warning!
30+
console.warn('I warn you to not to play with JS');
2731

2832
// Error :|
33+
console.error("Log error");
2934

3035
// Info
36+
console.info('Crocodiles eat 3-4 persons in a year');
3137

38+
// console.clear();
3239
// Testing
40+
const p = document.querySelector('p');
41+
console.assert(p.classList.contains('ouch'),'Ouch sorry');
3342

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

36-
// Viewing DOM Elements
46+
// Viewing DOM Elements to get all the functions available for that thing in js.
47+
console.dir(p);
3748

3849
// Grouping together
50+
dogs.forEach(dog => {
51+
console.groupCollapsed(`${dog.name}`);
52+
console.log(`Hey ${dog.name}`);
53+
console.log(`Hey, ${dog.name} is ${dog.age} old`);
54+
console.groupEnd(`${dog.name}`);
55+
})
3956

4057
// counting
58+
console.count('view');
59+
console.count('log');
60+
console.count('view');
61+
console.count('log');
62+
console.count('view');
63+
console.count('view');
64+
console.count('view');
65+
console.count('log');
66+
console.count('view');
4167

4268
// timing
43-
69+
console.time('fetching end');
70+
fetch('https://api.github.com/users/wesbos')
71+
.then(data => data.json())
72+
.then(data => {
73+
console.log('fetching data');
74+
console.log(data);
75+
})
4476
</script>
4577
</body>
4678
</html>

0 commit comments

Comments
 (0)