Forked from daaimah123/tools to help debug and common issues
Created
July 2, 2021 17:41
-
-
Save TheMajical/a6bb512c3abcedaeda40f675bf1b29e4 to your computer and use it in GitHub Desktop.
Debugging: Tools and Common Issues
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==> TOOLS | |
console.warn() | |
console.error() | |
console.table() ==> formatted table with index and value | |
'use strict'; ==> opts out of silen errors for scripts | |
Google Chrome breakpoint settings ==> click the line number to pause execution at that point and | |
observe scope tab to determine what is occuring at the breakpoint | |
==> COMMON ISSUES | |
prompt() ==> will always return a string, will need to change number answers to literals using Number() | |
ReferenceError | |
==> Can be related to scoping issue | |
==> TDZ error: Cannot access variable before initialized | |
Nullish Coalesce (??) | |
==> will evaluate truthy if null or undefined (NOT 0 or '') or will evaluate to parameter after the ?? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment