[JS30] Day09: Dev Tools Domination
這堂課介紹了 14 種 devtools 技巧,我挑我覺得重要的寫下來
- Regular
console.log("hello");
- Styled
console.log("%c I am some great text", "font-size:50px; background: red;");
- Warning!
console.warn("OH NOOO");
- Error
console.error("Shit!");
- clearing
console.clear();
- viewing
console.log(p);
console.dir(p);
- counting
console.count("Steven");
console.count("Steven");
console.count("Steven");
console.count("Steven");
console.count("Steven");
console.count("Jimmy");
console.count("Jimmy");
console.count("Jimmy");
console.count("Steven");
console.count("Steven");
- timing
console.time("fetching data");
fetch("https://api.github.com/users/wesbos")
.then((data) => data.json())
.then((data) => {
console.timeEnd("fetching data");
console.log(data);
});