3 ms·
My two cents: ⌘ + K => clears console inspect(element) => inspects element $(query) => equal to document.querySelector $$(query) => equal to d
by msoad 13y ago
My two cents:
⌘ + K => clears console
inspect(element) => inspects element
$(query) => equal to document.querySelector
$$(query) => equal to document.querySelectorAll
$_ => last output
clear() => clears the console. in your code your can `console.clear()`
console.count(label) => counts with a label that you pass
console.log("%cThis will be formatted with large, blue text", "color: blue; font-size: x-large");
a lot more info here:
https://developers.google.com/chrome-developer-tools/docs/console https://developers.google.com/chrome-developer-tools/docs/co...
- minikomi 13y agoFormatting log output - fantastic! I really like to use: $0 -> $9 last hilighted elements in the inspector view Especially when dealing with d3 generated svg .. can be tricky to get the right element otherwise. Also, you can still use the debugger; command to stop the context within a function (eg, callback from ajax request), from within the console.