⌘ + 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");
$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.
7 comments
[ 3.0 ms ] story [ 13.7 ms ] threadI really like to use:
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.You can check what's available in the console command line in Chrome with