Caching And Debugging - Study Mode

[#6] What is the purpose of the RegExp method test()?
Correct Answer

(B) Tests for a match in its string parameter

Explanation

Solution: The RegExp method test() tests for a match in its string parameter.

[#7] What is the purpose of the function parameter filetype?
Correct Answer

(A) File type to be expected

Explanation

Solution: The function parameter “filetype” lets you tell the script what file type to expect before loading.

[#8] Which of the following is the method used to add an element to the desired location?
Correct Answer

(C) element.appendChild()

Explanation

Solution: The method element.appendChild() is used to add the element to the desired location within the document tree.

[#9] Which program code doesn’t need preprocessing before being run?
Correct Answer

(B) Script

Explanation

Solution: A script is program code that doesn’t need pre-processing (e.g. compiling) before being run.

[#10] Which of the following is the definition for debugging?
Correct Answer

(C) Both Finding & Fixing bugs

Explanation

Solution: The process of finding and fixing bugs is called debugging and is a normal part of the development process.