Skip to content

Commit 57246c0

Browse files
committed
Day 09 14 Must know Dev Tools Tricks
Inspect an element and add a breakpoint on attribute change
1 parent 2b5b3b8 commit 57246c0

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

09 - Dev Tools Domination/index-START.html

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

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

2223
// Interpolated
24+
console.log('Hello I am a %s string!', 'poop'); //OR
25+
//console.log(`Hellow I am ${var}`);
2326

2427
// Styled
28+
console.log('%c I am some great text',
29+
'font-size:50px; background:red; text-shadow: 10px 10px 0 blue');
2530

2631
// warning!
32+
console.warn('OH NOOO');
2733

2834
// Error :|
35+
console.error('Shoot');
2936

3037
// Info
38+
console.info('Crocodiles eat 3-4 people per year');
3139

3240
// Testing
41+
const p = document.querySelector('p');
42+
console.assert(p.classList.contains('ouch'), 'That is wrong!');
3343

3444
// clearing
45+
console.clear();
3546

3647
// Viewing DOM Elements
48+
console.log(p);
49+
console.dir(p);
50+
51+
console.clear();
3752

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

4062
// counting
63+
console.count('Wes');
4164

4265
// timing
66+
console.time('fetching data');
67+
fetch('https://api.github.com/users/bweisberg')
68+
.then(data => data.json())
69+
.then(data => {
70+
console.timeEnd('fetching data');
71+
console.log(data);
72+
});
73+
74+
//table
75+
console.table(dogs);
4376

4477
</script>
4578
</body>

0 commit comments

Comments
 (0)