diff --git a/curriculum/challenges/_meta/lecture-debugging-techniques/meta.json b/curriculum/challenges/_meta/lecture-debugging-techniques/meta.json index 773376a6183..6f7645b8fb6 100644 --- a/curriculum/challenges/_meta/lecture-debugging-techniques/meta.json +++ b/curriculum/challenges/_meta/lecture-debugging-techniques/meta.json @@ -14,29 +14,17 @@ "id": "6733bec70d86e13522e98a4f", "title": "How Does the Throw Statement Work?" }, - { - "id": "6733becf4b0c353553b9bfa4", - "title": "How Does the Debugger Statement Work?" - }, - { - "id": "6733bedbbccea7357a8a7066", - "title": "How Can console.log() and console.error() Work for Simple Debugging?" - }, { "id": "6733bee844600f35c05b8264", "title": "How Does try...catch...finally Work?" }, { - "id": "6733bef186068435f8b7eebb", - "title": "How Can You Use Conditionals to Avoid Errors?" + "id": "6733becf4b0c353553b9bfa4", + "title": "How Does the Debugger Statement Work?" }, { "id": "6733befb703ca6361da3755b", "title": "What Are Some Examples of Using Advanced JavaScript Debugging Techniques?" - }, - { - "id": "6733bf075f945c3649ed78d8", - "title": "How Do You Use the Developer Tools to Debug JavaScript in the Browser?" } ], "helpCategory": "JavaScript" diff --git a/curriculum/challenges/english/25-front-end-development/lecture-debugging-techniques/6733bedbbccea7357a8a7066.md b/curriculum/challenges/english/25-front-end-development/lecture-debugging-techniques/6733bedbbccea7357a8a7066.md deleted file mode 100644 index 53c0ef81b24..00000000000 --- a/curriculum/challenges/english/25-front-end-development/lecture-debugging-techniques/6733bedbbccea7357a8a7066.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -id: 6733bedbbccea7357a8a7066 -title: How Can console.log() and console.error() Work for Simple Debugging? -challengeType: 11 -videoId: nVAaxZ34khk -dashedName: how-can-console-log-and-console-error-work-for-simple-debugging ---- - -# --description-- - -Watch the lecture video and answer the questions below. - -# --questions-- - -## --text-- - -Which of these methods is part of the built-in `console` object for debugging in JavaScript? - -## --answers-- - -`console.run()` - -### --feedback-- - -Look out for the method that helps display error messages in the developer console. - ---- - -`console.track()` - -### --feedback-- - -Look out for the method that helps display error messages in the developer console. - ---- - -`console.error()` - ---- - -`console.execute()` - -### --feedback-- - -Look out for the method that helps display error messages in the developer console. - -## --video-solution-- - -3 - -## --text-- - -Which method helps you print information to the console to understand the flow of your code? - -## --answers-- - -`console.warn()` - -### --feedback-- - -The method is the most common way to check variable values and outputs. - ---- - -`console.clear()` - -### --feedback-- - -The method is the most common way to check variable values and outputs. - ---- - -`console.debug()` - -### --feedback-- - -The method is the most common way to check variable values and outputs. - ---- - -`console.log()` - -## --video-solution-- - -4 - -## --text-- - -Is `console` in JavaScript an object or a function? - -## --answers-- - -Function - -### --feedback-- - -It provides methods like `log`, and `error`. - ---- - -Method - -### --feedback-- - -It provides methods like `log`, and `error`. - ---- - -Object - ---- - -Variable - -### --feedback-- - -It provides methods like `log`, and `error`. - -## --video-solution-- - -3 diff --git a/curriculum/challenges/english/25-front-end-development/lecture-debugging-techniques/6733bef186068435f8b7eebb.md b/curriculum/challenges/english/25-front-end-development/lecture-debugging-techniques/6733bef186068435f8b7eebb.md deleted file mode 100644 index 95c112018f0..00000000000 --- a/curriculum/challenges/english/25-front-end-development/lecture-debugging-techniques/6733bef186068435f8b7eebb.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -id: 6733bef186068435f8b7eebb -title: How Can You Use Conditionals to Avoid Errors? -challengeType: 11 -videoId: nVAaxZ34khk -dashedName: how-can-you-use-conditionals-to-avoid-errors ---- - -# --description-- - -Watch the lecture video and answer the questions below. - -# --questions-- - -## --text-- - -What is the output of this code? - -```js -const numbers = [10, 20, 30, 40]; -console.log(numbers[4]); -``` - -## --answers-- - -`10` - -### --feedback-- - -Think about what happens when you try to access an index that doesn't exist in an array. - ---- - -`20` - -### --feedback-- - -Think about what happens when you try to access an index that doesn't exist in an array. - ---- - -`undefined` - ---- - -`30` - -### --feedback-- - -Think about what happens when you try to access an index that doesn't exist in an array. - -## --video-solution-- - -3 - -## --text-- - -How do guard clauses benefit your code? - -## --answers-- - -They help add more nested conditions. - -### --feedback-- - -Think of a way to simplify functions and reduce nested code. - ---- - -They slow down code execution. - -### --feedback-- - -Think of a way to simplify functions and reduce nested code. - ---- - -They allow you to check conditions early and return immediately. - ---- - -They make functions more complex. - -### --feedback-- - -Think of a way to simplify functions and reduce nested code. - -## --video-solution-- - -3 - -## --text-- - -Why should you check the type of user input before performing actions on it? - -## --answers-- - -To increase the size of the code. - -### --feedback-- - -Think of preventing issues when user input isn't in the expected format. - ---- - -To add unnecessary complexity to the program. - -### --feedback-- - -Think of preventing issues when user input isn't in the expected format. - ---- - -To ensure that the input length is always correct. - -### --feedback-- - -Think of preventing issues when user input isn't in the expected format. - ---- - -To avoid errors when the input is not what you expected. - -## --video-solution-- - -4 diff --git a/curriculum/challenges/english/25-front-end-development/lecture-debugging-techniques/6733bf075f945c3649ed78d8.md b/curriculum/challenges/english/25-front-end-development/lecture-debugging-techniques/6733bf075f945c3649ed78d8.md deleted file mode 100644 index e220ca050d7..00000000000 --- a/curriculum/challenges/english/25-front-end-development/lecture-debugging-techniques/6733bf075f945c3649ed78d8.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -id: 6733bf075f945c3649ed78d8 -title: How Do You Use the Developer Tools to Debug JavaScript in the Browser? -challengeType: 11 -videoId: nVAaxZ34khk -dashedName: how-do-you-use-the-developer-tools-to-debug-javascript-in-the-browser ---- - -# --description-- - -Watch the lecture video and answer the questions below. - -# --questions-- - -## --text-- - -Which of these sections in the debugger tab shows the function calls that led to the current point of code execution? - -## --answers-- - -Watch. - -### --feedback-- - -Think about tracking the sequence of function calls. - ---- - -Breakpoints. - -### --feedback-- - -Think about tracking the sequence of function calls. - ---- - -Scope. - -### --feedback-- - -Think about tracking the sequence of function calls. - ---- - -Callstack. - -## --video-solution-- - -4 - -## --text-- - -Which of these happens when you add a breakpoint and execute the code in the debugger? - -## --answers-- - -The code skips that line and continues executing. - -### --feedback-- - -Think about how breakpoints pause execution for inspection. - ---- - -The execution pauses before the line with a bluish icon appears. - ---- - -The code runs twice as fast. - -### --feedback-- - -Think about how breakpoints pause execution for inspection. - ---- - -The breakpoint removes itself automatically. - -### --feedback-- - -Think about how breakpoints pause execution for inspection. - -## --video-solution-- - -2 - -## --text-- - -How do you add a watch expression in the debugger to confirm the data type of variables? - -## --answers-- - -Click the minus (-) icon beside Watch and press Enter. - -### --feedback-- - -Think about the symbol that adds a new expression. - ---- - -Click the plus (+) icon beside Watch and press Enter. - ---- - -Right-click the variable and select "Add Watch." - -### --feedback-- - -Think about the symbol that adds a new expression. - ---- - -Double-click on the variable name in the Watch panel. - -### --feedback-- - -Think about the symbol that adds a new expression. - -## --video-solution-- - -2