X Tutup
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions 09 - Dev Tools Domination/index-START.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,61 @@
}

// Regular
console.log('Hey');

// Interpolated
console.log('Hey %s', '💩');

// Styled
console.log('%c Hey', 'font-size: 50px');

// warning!
console.warn('whoops');

// Error :|
console.error('oh no!');

// Info
console.info('did you know you can do this stuff in the console?');

// Testing
console.assert(1 === 2, 'That is not true');

// clearing
console.clear();

// Viewing DOM Elements
console.dir(document.querySelector('p'));

// Grouping together
dogs.forEach(dog => {
console.groupCollapsed(`${dog.name}`);
console.log(`this is ${dog.name}`);
console.log(`${dog.name} is ${dog.age} years old`);
console.log(`${dog.name} is ${dog.age * 7} in dog years`);
console.groupEnd(`${dog.name}`);
});

// counting
console.count('Boogers');
console.count('Boogers');
console.count('Boogers');
console.count('Boogers');
console.count('Boogers');
console.count('Boogers');

// timing
console.time('fetching data');
fetch('https://api.github.com/users/asap')
.then(data => data.json())
.then(data => {
console.timeEnd('fetching data');
console.log(data);
});


// table
console.table(dogs);

</script>
</body>
Expand Down
X Tutup