




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Which of the following escape sequences will print the backslash character? - Correct Answers -\ Which of the following characters matches the start of a line in a regular expression - Correct Answers -^ What is the main role of JavaScript in an AJAX transaction? - Correct Answers -To request XML or plain text data from a web server Which property is used to add CSS styles to elements in a Web Page? - Correct Answers -HTMLElement.style What is a bug in the JavaScript code? - Correct Answers -An error in the code Which of the following is not a valid property? - Correct Answers -coords.timestamp What readyState value specifies that the response header has been received, but the message body is yet to be received? - Correct Answers - Which of the following casting rules is incorrect when concatenating? (true is a Boolean value) - Correct Answers -9 + true equals "9true" Which of the following statements is true of semicolons in JavaScript? - Correct Answers -Semicolons are essential while combining separate statements in a line Which statement is false in reference of XSS attacks? - Correct Answers -They cannot be performed through emails or mail clients Sarah has created a JavaScript library, and now she wants to include it in her document. Which of the following statements follows the correct syntax to link the library in her document? - Correct Answers - Which of the following information is not a part of the cookie header? - Correct Answers -expires = date
Which of the following is not true of JavaScript plug-in? - Correct Answers -Plug-ins cannot be used without the library they depend upon; Every pre-made script is a library How can a cookie be deleted using JavaScript? - Correct Answers -By setting a passed expiration date Which event is triggered on the element when the selection is modified? - Correct Answers -onchange Which of the following methods will remove all the data from the storage? - Correct Answers -localStorage.clear(); Which of the following initializes the HTTP request in an AJAX transaction? - Correct Answers -The open() method What is a named memory block that serves as containers for a value called? - Correct Answers -Operator Variable Which of the following solutions will not help in preventing XSS attacks? - Correct Answers -Storing login credentials in cookies for security Which of the following characters is used as the escape character in JavaScript? - Correct Answers - Which of the following statements is not true of the XMLHttpRequest object? - Correct Answers -It transfers the data between a client and server Which of the following statements is not true of the window object? - Correct Answers -It is subordinate to the navigator object Which method of the history object is used to create a new history entry - Correct Answers -pushState() Which of the following objects is used to get information about the user's browser - Correct Answers -navigator Which of the following is a major advantage of using the appendChild() Method? - Correct Answers -It can be used to add elements to the DOM without overwriting the existing page Which programming language is typically used in AJAX transactions to query databases? - Correct Answers -SQL
Which property of the image object can be used to check if the image has finished loading? - Correct Answers -complete Which property of the image object returns the number of elements in a form? - Correct Answers -length Which of the following statements is true of the substr() method? - Correct Answers -It takes the starting index and the number of characters to extract Which of the following statements is not true of the variables declared using the let keyword? - Correct Answers -Variables declared using let are hoisted Which method is used to delete a child object of a parent element? - Correct Answers - removeChild() Which of the following loops should you use if a loop must run at least once even if the condition is false? - Correct Answers -do while Which of the following languages has JavaScript least in common with? - Correct Answers -VBScript A function block is enclosed with? - Correct Answers -{} Which of the following statements is identified as a jQuery statement by the interpreter?
Which of the following is an arithmetic operator? - Correct Answers -%= Which of the following expressions uses the correct hierarchy? - Correct Answers - window.document.forms.length; Which method initializes an HTTP request()? - Correct Answers -open() Which of the following cannot be used to perform concatenation in JavaScript? - Correct Answers -++ Which of the following references is invalid - Correct Answers -timestamp.accuracy Which of the following statements will return an array of all images in a document? - Correct Answers -document.getElementsByTagName("img") Which of the following conditions will return false? Consider X and Z to be true and Y to be false. - Correct Answers -Y&&Z What technology is not a server-side scripting environment? - Correct Answers -jQuery Which of the following is an invalid parameter in reference to a cookie header? - Correct Answers -name=name_cookie Which of the following is not a property of a Position object? - Correct Answers - geolocation Which of the following is true of the String.slice() method? - Correct Answers -Return a section of the string Which of the following code blocks calls a function example() from an external script sample.js? - Correct Answers - Which of the following is not true of copyleft? - Correct Answers -A code library that uses another copyleft can be distributed for a charge Which of the following statements about inheritance is JavaScript is true? - Correct Answers -JavaScript support both prototypal and call-based inheritance Which of the following coding practices may augment to security issues in a page? - Correct Answers -Use browser-specific code Methods like floor(), ceil() and sin() are associated with which object? - Correct Answers -Math
Which of the following will correctly retrieve the corresponding value of an HTML element's attribute within the DOM? - Correct Answers -getAttribute(AttributeName) Which code is the JavaScript equivalent of clicking the browser's Back button? - Correct Answers -history.go(-1) What is the purpose of the break statement in JavaScript? - Correct Answers -To exit a control structure Which method will bring a window object to the top? - Correct Answers -window.focus() In an AJAX transaction, which readyState value indicates that the XMLHttpRequest has been sent but no response has been received yet? - Correct Answers -readyState value 2 Which variable data type is a variable that has not yet had a value assigned to it? - Correct Answers -Undefined Which JavaScript object reflects information about the browser being used to view the Web page? - Correct Answers -navigator Cross-site scripting (XSS) is a type of: - Correct Answers -code-injection attack Which type of error are you most likely to debug using watchpoints? - Correct Answers - Logic Error What are cookies? - Correct Answers -Small pieces of information sent to a client computer What makes a scripting language different from a programming language? - Correct Answers -Scripting languages are interpreted and programming languages are compiled. Which of the following is not a valid variable name in JavaScript? - Correct Answers - this Which browser security consideration should a JavaScript developer remember when developing a script? - Correct Answers -JavaScript can be disabled by the user and therefore cannot be relied upon to run. You work for a mid-size company with a large Web site that has a very wide customer base. Which is the best method for testing your JavaScript code for this site? - Correct Answers -Test in various browsers, versions and operating systems.
What is the term for a JavaScript function used to create a custom object? - Correct Answers -Constructor Which of the following is a typical AJAX request? - Correct Answers -Returning server variables from the server to the client Which version of the Microsoft internet explorer browser first supported javascript - Correct Answers -Version 3