Final Exam - Final Assessment - JavaScript - Etrain
Final Exam - Final Assessment - JavaScript - Etrain
JavaScript Help
Previous Next
Final Exam
Bookmark this page
Final Exam Instructions
1. Time allowed: 1 hour
2. Attempts per question:
3. Clicking the "Submit" button when it appears under each Question, means your submission is FINAL. You will NOT be
able to resubmit your answer for that question ever again
4. Check your grades in the course at any time by clicking on the "Progress" tab
IMPORTANT: Do not let the time run out and expect the system to grade you automatically. You must explicitly
submit your answers, otherwise they would be marked as incomplete.
Question 1
1 point possible (graded)
How can you get the total number of arguments passed to a function ?
Question 2
1 point possible (graded)
Which of the following function of Number object forces a number to display in exponential notation ?
toExponential()
toFixed()
toPrecision()
toLocaleString()
Question 3
1 point possible (graded)
Which of the following function of Array object returns a string representing the array and its elements ?
toSource()
sort()
splice()
toString()
Question 4
1 point possible (graded)
Which of the following is correct about callbacks ?
Some callbacks are just events, called to give the user a chance to react when a certain state is triggered.
Question 5
1 point possible (graded)
Which of the following function of String object combines the text of two strings and returns a new string ?
add()
merge()
concat()
append()
Question 6
1 point possible (graded)
Which of the following function of Array object removes the last element from an array and returns that element ?
pop()
push()
join()
map()
Question 7
1 point possible (graded)
Which of the following is the correct syntax to display "Hello World" in an alert box using JavaScript ?
alertbox("Hello World");
msg("Hello World");
msgbox("Hello World");
alert("Hello World");
Question 8
1 point possible (graded)
Which of the following is not a reserved word in JavaScript ?
interface
throws
program
short
Question 9
1 point possible (graded)
What is the syntax for creating a function in JavaScript named as IBMfunc ?
function = IBMfunc()
function IBMfunc()
function := IBMfunc()
function : IBMfunc()
Submit You have used 0 of 2 attempts
Question 10
1 point possible (graded)
What is the JavaScript syntax for printing values in Console ?
print(5)
console.log(5);
console.print(5);
print.console(5);
Question 11
1 point possible (graded)
What will be the command to print the number of characters in the string "HelloWorld" ?
document.write("HelloWorld".len);
document.write(sizeof("HelloWorld"));
document.write("HelloWorld".length);
document.write(lenof("HelloWorld"));
Question 12
1 point possible (graded)
What is the method in JavaScript used to remove the whitespace at the beginning and end of any string ?
strip()
trim()
stripped()
trimmed()
Integer(value)
ifInteger(value)
isInteger(value)
ifinteger(value)
Question 14
1 point possible (graded)
Which of the following is an advantage of using JavaScript ?
Increased interactivity.
Question 15
1 point possible (graded)
Which function of an Array object calls a function for each element in the array ?
forEach()
every()
forEvery()
each()
Question 16
1 point possible (graded)
p p g
JavaScript is a ________ Side Scripting Language.
Server
ISP
Browser
Question 17
1 point possible (graded)
JavaScript is ________ language.
a compiled
an interpreted
Question 18
1 point possible (graded)
Which was the first browser to support JavaScript ?
Mozilla Firefox
Netscape
Google Chrome
IE
Question 19
1 point possible (graded)
Choose the client-side JavaScript object:
Database
Cursor
Client
FileUpLoad
Question 20
1 point possible (graded)
Using _______ statement is how you test for a specific condition.
Select
If
Switch
For
Question 21
1 point possible (graded)
When a JavaScript object is sent to Java, the runtime engine creates a Java wrapper of type ___________
ScriptObject
JSObject
JavaObject
Jobject
Question 22
1 point possible (graded)
_________ is a wrapped Java array, accessed from within JavaScript code.
JavaArray
JavaClass
JavaObject
JavaPackage
Question 23
1 point possible (graded)
The syntax of a blur method in a button object is ______________
Blur()
Blur(contrast)
Blur(value)
Blur(depth)
Question 24
1 point possible (graded)
Is it possible to nest functions in JavaScript ?
True
False
Question 25
1 point possible (graded)
What does javascript use ____ instead of == and !=
It uses equalto()