No student devices needed. Know more
22 questions
Which of the following can't be done with
client-side JavaScript?
Validating a form
Sending a form's contents by email
Storing the form's contents to a database file on
the server
None of the above
Which of the following is the structure of an
if statement?
if (conditional expression is true)
thenexecute this codeend if
if (conditional expression is true)execute this
codeend if
if (conditional expression is true)
{then execute this code>->}
if (conditional expression is true) then {execute
this code}
How to create a Date object in JavaScript?
dateObjectName = new Date([parameters])
dateObjectName.new Date([parameters])
dateObjectName := new Date([parameters])
dateObjectName Date([parameters])
The _______ method of an Array object adds and/or
removes elements from an array.
Reverse
Shift
Slice
Splice
To set up the window to capture all Click events,
we use which of the following statement?
window.captureEvents(Event.CLICK);
window.handleEvents (Event.CLICK);
window.routeEvents(Event.CLICK );
window.raiseEvents(Event.CLICK );
Which of the following is not a reserved word in
JavaScript?
interface
throws
program
short
To automatically open the console when a JavaScript
error occurs which of the following is added to prefs.js?
user_pref("
javascript.console.open_on_error", false);
user_pref("javascript.console.open_error");
user_pref("javascript.console.open_error
", false);
user_pref("javascript.console.open_on_error",
true);
What is mean by "this" keyword in javascript?
It refers current object
It referes previous object
It is variable which contains value
None of the above
Which types of image maps can be used with JavaScript?
Server-side image maps
Client-side image maps
Server-side image maps and Client-side image maps
None of the above
Which is the correct way to write a JavaScript array?
var txt = new
Array(1:"tim",2:"kim",3:"jim")
var txt = new
Array:1=("tim")2=("kim")3=("jim")
var txt = new
Array("tim","kim","jim")
var txt = new
Array="tim","kim","jim"
What does the <noscript> tag do?
Enclose text to be displayed by non-JavaScript
browsers.
Prevents scripts on the page from executing.
Describes certain low-budget movies.
None of the above
If para1 is the DOM object for a paragraph, what is
the correct syntax to change the text within the paragraph?
"New Text"?
para1.value="New Text";
para1.firstChild.nodeValue= "New
Text";
para1.nodeValue="New Text";
JavaScript entities start with _______ and end with
_________.
Semicolon, colon
Semicolon, Ampersand
Ampersand, colon
Ampersand, semicolon
Which of the following way can be used to indicate
the LANGUAGE attribute?
<LANGUAGE="JavaScriptVersion">
<SCRIPT
LANGUAGE="JavaScriptVersion">
<SCRIPT
LANGUAGE="JavaScriptVersion"> JavaScript
statements…</SCRIPT>
<SCRIPT
LANGUAGE="JavaScriptVersion"!> JavaScript
statements…<SCRIPT>
Inside which HTML element do we put the
JavaScript?
<js>
<scripting>
<script>
<javascript>
What is the correct syntax for referring to an
external script called " abc.js"?
<script href=" abc.js">
<script name=" abc.js">
<script src=" abc.js">
None of the above
__________ JavaScript is also called
server-side JavaScript.
Microsoft
Navigator
LiveWire
Native
What is the value of:
”41” + 1
42
“42”
411
“411”
What other languages are typically used with JavaScript?
Python
Ruby
HTML & CSS
SQL
What is the difference between var and let in JavaScript?
There are no differences, they are both the same.
let is visible through blocks and accessed globally, var isn't.
var is visible through blocks and accessed globally, let isn't.
let is used more frequently, var isn't.
Explore all questions with a free account