1/104
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Which of the following escape sequences will print the backslash character?
\\
Which of the following characters matches the start of a line in a regular expression
^
What is the main role of JavaScript in an AJAX transaction?
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?
HTMLElement.style
What is a bug in the JavaScript code?
An error in the code
Which of the following is not a valid property?
coords.timestamp
What readyState value specifies that the response header has been received, but the message body is yet to be received?
3
Which of the following casting rules is incorrect when concatenating? (true is a Boolean value)
9 + true equals "9true"
Which of the following statements is true of semicolons in JavaScript?
Semicolons are essential while combining separate statements in a line
Which statement is false in reference of XSS attacks?
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?
Which of the following information is not a part of the cookie header?
expires = date
Which of the following is not true of JavaScript plug-in?
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?
By setting a passed expiration date
Which event is triggered on the
onchange
Which of the following methods will remove all the data from the storage?
localStorage.clear();
Which of the following initializes the HTTP request in an AJAX transaction?
The open() method
What is a named memory block that serves as containers for a value called?
Operator
Variable
Which of the following solutions will not help in preventing XSS attacks?
Storing login credentials in cookies for security
Which of the following characters is used as the escape character in JavaScript?
\
Which of the following statements is not true of the XMLHttpRequest object?
It transfers the data between a client and server
Which of the following statements is not true of the window object?
It is subordinate to the navigator object
Which method of the history object is used to create a new history entry
pushState()
Which of the following objects is used to get information about the user's browser
navigator
Which of the following is a major advantage of using the appendChild() Method?
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?
SQL
Which of the following is true when using AJAX with databases?
AJAX can perform all back-end database operations
Which of the following input types masks the value entered by users?
password
A user enters confidential data on a web site while performing a task. This data was redisplayed on the Web page, after the task was completed. The data sent between the server and browser was not encoded as HTML entities. Which of the following vulnerabilities will this result?
Non-persistent XSS
Why does the Array.sort() method produce unreliable results when elements of an array are numbers?
The sort() method treats numbers as strings and sorts them accordingly
Which method can be used to increase option elements in a select statement?
add()
Which of the following technologies is not based on JavaScript?
Java
Which of the following is true of the getElementById() method?
It return the first occurrence of an element in a document with the specified id
Which of the following is a disadvantage associated with the use of JavaScript frameworks?
JavaScript frameworks are large in size
Which of the following error types are the hardest to debug?
Logic
Which of the following characters is used by jQuery as a reference to itself?
$
Which of the following is not true of the
It has drawing capabilities
Which of the following uses of a cookie may compromise a user's security?
Authenticate a user
Which of the following requests the transfer of data between a server and client?
XMLHttpRequest
Which of the following variables will be present as a property on the window object?
var x= 5
Which property of the image object can be used to check if the image has finished loading?
complete
Which property of the image object returns the number of elements in a form?
length
Which of the following statements is true of the substr() method?
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?
Variables declared using let are hoisted
Which method is used to delete a child object of a parent element?
removeChild()
Which of the following loops should you use if a loop must run at least once even if the condition is false?
do while
Which of the following languages has JavaScript least in common with?
VBScript
A function block is enclosed with?
{}
Which of the following statements is identified as a jQuery statement by the interpreter?
$("button").click()
Which of the following statements is not true of jQuery
It focuses on server-side scripting
When does the load event occur?
When a page finishes loading
Which of the following adds a color picker on the Web page and specifies the default color as red?
What is the correct syntax of changing the CSS style of an HTML element?
Htmlelement.style.property = value
Which of the following is an arithmetic operator?
%=
Which of the following expressions uses the correct hierarchy?
window.document.forms.length;
Which method initializes an HTTP request()?
open()
Which of the following cannot be used to perform concatenation in JavaScript?
++
Which of the following references is invalid
timestamp.accuracy
Which of the following statements will return an array of all images in a document?
document.getElementsByTagName("img")
Which of the following conditions will return false? Consider X and Z to be true and Y to be false.
Y&&Z
What technology is not a server-side scripting environment ?
jQuery
Which of the following is an invalid parameter in reference to a cookie header?
name=name_cookie
Which of the following is not a property of a Position object?
geolocation
Which of the following is true of the String.slice() method?
Return a section of the string
Which of the following code blocks calls a function example() from an external script sample.js?
Which of the following is not true of copyleft?
A code library that uses another copyleft can be distributed for a charge
Which of the following statements about inheritance is JavaScript is true?
JavaScript support both prototypal and call-based inheritance
Which of the following coding practices may augment to security issues in a page?
Use browser-specific code
Methods like floor(), ceil() and sin() are associated with which object?
Math
Which of the following objects can be used to access cookies?
document
Which form event handler executes the specified code when the value of an element is modified from the default?
onchange
Which HTML element serves as a container for graphics on a Web page?
Which form object will you use to mask the value entered by a user?
password
Which of the following statements will execute only if the conditions A and B are true?
Run-Time
Which of the following languages is not a scripting language?
Java
Which of the following hierarchical dot notations is an invalid reference?
document.history
Which of the following is true of the variables declared using let and const?
Variables declared using const must be initialized at declaration, while the variables declared using let can be initialized anywhere
Which of the following constitutes an XSS attack?
A hyperlink that carries malicious content
You created a webpage containing a form for user's to join your company's mailing list. You need to validate user input with the minimum amount of bandwidth. Which technology should you use?
Client-Side JavaScript
Correct syntax for declaring a variable
var_LAST_name
Which JavaScript Event Handler is triggered when a user clicks her mouse button outside a particular field after typing input there?
onblur
Technique of changing variables from one data type to another?
Casting
Disadvantage to using JavaScript libraries
Does not guarantee high quality secure code
Which JavaScript "flavor" attempts to diminish the differences between other JavaScript flavors and standardize the language?
ECMAScript
select object that loses focus after a user makes a selection, but only if it's a selection other than the default
onchange
Which statement about the prototype property is true?
It's available in all objects
What was Server-Side JavaScript (SSJS) originally called?
LiveWire
Which of the following will correctly retrieve the corresponding value of an HTML element's attribute within the DOM?
getAttribute(AttributeName)
Which code is the JavaScript equivalent of clicking the browser's Back button?
history.go(-1)
What is the purpose of the break statement in JavaScript?
To exit a control structure
Which method will bring a window object to the top?
window.focus()
In an AJAX transaction, which readyState value indicates that the XMLHttpRequest has been sent but no response has been received yet?
readyState value 2
Which variable data type is a variable that has not yet had a value assigned to it?
Undefined
Which JavaScript object reflects information about the browser being used to view the Web page?
navigator
Cross-site scripting (XSS) is a type of:
code-injection attack
Which type of error are you most likely to debug using watchpoints?
Logic Error
What are cookies?
Small pieces of information sent to a client computer
What makes a scripting language different from a programming language?
Scripting languages are interpreted and programming languages are compiled.
Which of the following is not a valid variable name in JavaScript?
this
Which browser security consideration should a JavaScript developer remember when developing a script?
JavaScript can be disabled by the user and therefore cannot be relied upon to run.