HOTSPOT -You are creating a function by using JavaScript. The function accepts an object as the parameter and returns a string that identifies the data type of the object.You have the following requirements:✑ The function must return "Number" if the object is a number.✑ The function must return "String" if the object is a string.✑ The function must return "Unknown" if the object is neither a number nor a string.You need to implement the function to meet the requirements.How should you build the code segment? (To answer, select the appropriate options from the drop-down lists in the answer area.)Hot Area:
You need to test the value of the following variable in JavaScript. var length = "75";A block of code must execute if the length equals 75 regardless of the data type.You need to use the statement that meets this requirement.Which lines of code should you use? (Each correct answer presents a complete solution. Choose two.)
You are developing an application that uses a third-party JavaScript library named doWork().The library occasionally throws an "object is null or undefined" error with an error code of-2146823281.The application must:✑ Extract and handle the exceptions thrown by doWork()✑ Continue normal program execution if other exceptions occurYou need to implement the requirements.Which code segment should you use?
You are troubleshooting a web page that includes the following code. (Line numbers are included for reference only.)What is displayed in the alert from line 11?
You are developing a web application that consumes services from a third-party application. A web worker processes the third-party application requests in the background. A page in the application instantiates the web worker process.You need to establish two-way communications between the web worker process and the page.Which two actions will achieve this goal? (Each correct answer presents a complete solution. Choose two.)
DRAG DROP -You are validating user input by using JavaScript and regular expressions.A group of predefined regular expressions will validate two input fields:✑ An email address in a function named validateEmail (for example,[email protected])✑ A nine-digit number that allows optional hyphens after the second and fifth character in a function named validateSSN(for example, 555555555 or 555-55-5555)You need to use the correct expression to validate the input.Which expression should you insert into each function? (To answer, drag the appropriate regular expression statement to the correct location. Each regular expression statement may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)Select and Place: