stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Certification Practice Flashcards | StudBud
Explore
/
Certification Practice
Certification Practice
20 terms
·
StudBud Administration
·
54 plays
JavaScript certification practice test
Flashcards
20 cards
F
Practice quiz
P
Host live
L
Questions
20
Answers
1
What will be the output of the following code snippet?
1210.1x15xy
35
1010.115
35.1
2
Which of the following solutions will not help in preventing XSS attacks?
Blocking the script on the browser
Validating user input before submission
Storing login credentials in cookies for security
Encoding the output URL in HTML entities
3
Consider the following code block. What will be the output of this code block?
v1
undefined
4, BMW
[object Object]
4
Which of the following is a disadvantage associated with the use of JavaScript frameworks?
They aren't safe, they contain a lot of open vulnerabilities
All frameworks cost a significant amount to developers.
JavaScript frameworks are large in size.
They extend a project's development period
5
Consider the following code block. What will be the output of this code snippet?
15
10
Random, either 10 or 15
SyntaxError
6
Which of the following statements is not true of the window object?
Reps the browser's frame and the elements associated with it
It is subordinate to the navigator object.
alert(), prompt() & confirm() are associated with it
It is the default object in JavaScript.
7
Which of the following characters is used as the escape character in JavaScript?
-
?
\
/
8
What is a named memory block that serves as containers for a value called?
Event
Operator
Variable
Datatype
9
Which of the following expressions will allow a user to interact with the select statement?
document.forms[0].elements[0].enabled = true;
document.forms[0].elements[0].canEdit = true;
document.forms[0].elements[0].disabled = false;
document.forms[0].elements[0].hidden = false;
10
Which method can be used to increase option elements in a select statement?
add()
item()
value()
option()
11
Which of the following is true of the getElementById() method?
last element in the document with a specified id is returned
It returns an array of all the elements with a specified id.
If multiple have the same id it returns a ref to any of them
returns the first element with that specific id
12
Which will make sure that a user enters a value in the text field before submitting the form?
document.forms[0].elements[0].name = required;
document.forms[0].elements[0].value = required;
document.forms[0].elements[0].required = true;
document.forms[0].elements[0].checkValidity = true;
13
Which of the following characters is used by jQuery as a reference to itself?
$
-
#
@
14
if a user enters "Adam" and "Warlock" at the two prompts, what is the output?
fnamelname
Nothing, blank screen
ReferenceError: fname not defined
AdamWarlock
15
What will be the output of the following expression?
"ry black hole has an even"
"ry black hole has an e"
"ery black hole has an "
"ery black hole has an eve"
16
Which of the following technologies is not based on JavaScript?
ECMAScript
React
Java
jQuery
17
Which method of the history object is used to create a new history entry?
replaceState()
pushState()
go()
newState()
18
Which of the following is not true of the <canvas> element?
It has drawing capabilities of its own.
It serves as a container for graphics in a Web page.
It must be defined before drawing in a Web page.
declares area in a page where JS animations can be embedded
19
Which of the following statements is not true of the XMLHttpRequest object?
readyState value determines the state of the XMLHttpRequest
It transfers the data between a client and server.
It requests the transfer of data between a client and server
It can support any data in text-based format.
20
Which of the following error types are the hardest to debug?
Run-time
Logic
Load-time
Syntax