3 ms·
Learn how to use the browser's debugger, how to plant breakpoints, how to step through the code, and how to read the scope. https://developer.chrome.com/devtoo
by lollipop25 11y ago
Learn how to use the browser's debugger, how to plant breakpoints, how to step through the code, and how to read the scope.
https://developer.chrome.com/devtools/docs/javascript-debugging https://developer.chrome.com/devtools/docs/javascript-debugg...
For snippets like above, you don't even need a web page. In place of a page and breakpoint approach, you can put a `debugger;` statement at the start of the function. Open a browser, F12, paste the code in the console, call the function, pretty-print the code then step through it.