Flashcards

Javascript Errors

1. How do you halt program execution with an instance of an error object in JavaScript?

2. What kind of error is thrown when a variable or parameter is not of a valid type?

3. What kind of error will be thrown when the below code is executed?

function callPuppy() {
  const puppy = "puppy";
  console.log(pupy);
}

callPuppy();

4. What kind of error will be thrown when the below code is run?

function broken () {
  console.log("I'm broke")
}}

5. What kind of error will the below code throw when executed?

const puppy = "puppy";

puppy = "apple";

6. What kind of error will the below code throw when executed?

let dog;

dog();

7. What type of block will allow you to run an erroring function then continue the execution of code after that function is run?

8. What type of error is thrown when a non-existent variable is referenced?

9. When is a JavaScript Error Object thrown?

10. When kind of error is thrown when the JavaScript engine attempts to parse code that does not conform to the syntax of the JavaScript language?


TDD

1. Identify at least two reasons why developers use TDD.

2. What are the three steps of the TDD workflow?

3. What does a developer do in the Green step in the TDD workflow?

4. What does a developer do in the Red step in the TDD workflow?

5. What does a developer do in the Refactor step in the TDD workflow?

6. What does TDD stand for?