Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1.\"When creating an object using a literal, you separate multiple property-valu

ID: 3595079 • Letter: 1

Question

1."When creating an object using a literal, you separate multiple property-value pairs with ____."

colons

spaces

semicolons

commas

QUESTION 2

Who is making the Web standards?

Google

Microsoft

Mozilla

The World Wide Web Consortium

QUESTION 3

What is the correct HTML for making a text area?

<input type="textbox">

<textarea>

<input type="textarea">

<input type="textspace">

2 points   

QUESTION 4

In DOM, if you want to access the title property of the current document as specified by the HTML <title>...</title> tages, what is the object notation?

window.document.title

window.location.title

title.document.window

window.title.document

2 points   

QUESTION 5

Which of following is NOT true statement about variables?

Their names are case sensitive.

They can contain numeric or non-numeric information.

Their names must start with a letter or an underscore.

Their names may contain spaces.

2 points   

QUESTION 6

Create an object that contains name and age.

Person.name = "John", Person.age = 32

var Person = {"name": "John", "age":"32"}

var Person = new {"name": John, age:32}

var Person = new Person {"name": "John", "age":"32"}

2 points   

QUESTION 7

Change Bob to Mark in the following array. var names = ["James", "Lisa", "Mike", "Bob"];

names[3] = "Mark";

names[Bob] = "Mark";

names[5] = "Mark";

names[4] = "Mark";

2 points   

QUESTION 8

A ____ variable is one that is declared outside a function and is available to all parts of your program.

local

limited

scoped

global

2 points   

QUESTION 9

What is the correct HTML element for inserting a line break?

<lb>

<break>

<br>

<lbr>

2 points   

QUESTION 10

Which method displays a dialog box with an OK button?

write()

alert()

onclick()

getElementById()

2 points   

QUESTION 11

Which statement sets the value of variable paid to Boolean true?

var paid = true;

var paid = "true";

var paid = 'true';

var paid.true();

  

QUESTION 12

What is the correct HTML for creating a hyperlink?

<a href="http://www.w3schools.com">W3Schools</a>

<a>http://www.w3schools.com</a>

<a url="http://www.w3schools.com">W3Schools.com</a>

<a name="http://www.w3schools.com">W3Schools.com</a>

QUESTION 13

What is an onClick event handler?

An object that detects the mouse's location in the browser.

A script that executes in response to the user clicking the mouse.

An HTML element that the user can click.

A JavaScript tag that the user can click.

QUESTION 14

What is the correct HTML for adding a background color?

<background>yellow</background>

<body bg="yellow">

<body>

<body bgd='yellow'>

QUESTION 15

The variables or values that you place in the parentheses of a function call statement are called ____.

string operators

primitive types

arguments

event listeners

2 points   

QUESTION 16

"In JavaScript programming, you can write your own procedures, called ____, which refer to a related group of JavaScript statements that are executed as a single unit."

programs

functions

modules

objects

2 points   

QUESTION 17

The top level of the DOM hierarchy is occupied by:

The document property

The document object

The document method

The window object

2 points   

QUESTION 18

Which HTML element defines the title of a document?

<head>

<title>

<meta>

<heading>

2 points   

QUESTION 19

How can you make a bulleted list?

<ul>

<dl>

<ol>

<list>

2 points   

QUESTION 20

What is the correct HTML for making a text input field?

<input type="text">

<textinput type="text">

<textfield>

<input type="textfield">

2 points   

QUESTION 21

For a string called myString containing the value "stupid is as stupid does, " which of the following would return a value of -1?

myString.indexOf("stupid");

myString.lastIndexOf("stupid");

myString.indexof("is stupid");

myString.indexOf("as stupid");

2 points   

QUESTION 22

Deriving new objects by using the design of currently existing objects is known as:

Encapsulation

Inheritance

Instantiation

Abstraction

2 points   

QUESTION 23

A variable defined inside a function definition is called

A local variable

A global variable

An argument

A parameter

2 points   

QUESTION 24

"To execute the same statement or command block for all the properties within a custom object, you can use the ____ statement."

for/each

while/in

for/in

loop/in

2 points   

QUESTION 25

A(n) ____ tells the compiler or interpreter that the character that follows it has a special purpose.

exclamation point

escape character

null character

upper case character

2 points   

QUESTION 26

What extra tags must be added to an HTML page to include JavaScript statments?

<script> and </script>

<type="text/javascript">

<!-- and -->

<?> and </?>

2 points   

QUESTION 27

The operator that compares the value and the type is _____.

===

=

!=

==

2 points   

QUESTION 28

What do you use to enclose the blocks of code in conditionals and loops?

Parentheses

Square brackets

Curly brackets

Less-than and grater-than characters

2 points   

QUESTION 29

Which of the following would send an alert to the viewer that tells the name of the browser being used?

window.alert("You are using " + navigator.appVersion);

window.alert("You are using " + navigator.appName);

window.alert("You are using " + navigator.javaEnabled());

window.alert("You are using + navigator.appName");

2 points   

QUESTION 30

What is the correct HTML for making a checkbox?

<checkbox>

<check>

<input type="check">

<input type="checkbox">

2 points   

QUESTION 31

What does HTML stand for?

Hyper Text Markup Language

Hyperlinks and Text Markup Language

Home Tool Markup Language

Hypo Text Makeup Langauge

2 points   

QUESTION 32

What could you say about the following code?

myhouse.kitchen = "big";

Assuming the kitchen object exists, the myhouse property is assigned a new string value.

Assuming the myhouse object exists, the kitchen property is assigned a new string value of "big" or is initialized with the value "big".

Assuming the myhouse object exists, the value of the variable kitchen is added to the string big.

This wouldn't do anything.

2 points   

QUESTION 33

Which of the following is likely to cause an infinite loop to occur?

There are too many statements in the loop.

The condition to terminate the loop is never met.

The wrong sort of loop has been used.

There are only few statements in the loop.

QUESTION 34

Choose the correct HTML element for the largest heading:

<h1>

<heading>

<h6>

<head>

2 points   

QUESTION 35

You can create a function that will be used as an object method by referring to any object properties it contains with the ____ reference.

self

this

super

object

2 points   

QUESTION 36

Which method of the Math object rounds a value to the next lowest integer?

ceil()

floor()

max()

min()

2 points   

QUESTION 37

Which keyword do you use to create a variable?

for

value

assign

var

2 points   

QUESTION 38

A(n) ____ statement is a statement that returns a value to the statement that called the function.

return

replace

value

exit

2 points   

QUESTION 39

You access an object method with the following syntax:

objectName.methodName();

objectName.access.methodName();

objectName.enter.methodName();

objectName(methodName());

2 points   

QUESTION 40

What happens when a function executes a return statement?

An error message is generated.

A value is returned and function execution stops.

A value is returned and function execution continues.

A vlaue is returned and function will no longer be usable.

2 points   

QUESTION 41

A new object created from a constructor function is known as:

an instance of the object

a method of the object

a function of the object

a prototype

2 points   

QUESTION 42

What is the correct HTML for making a drop-down list?

<input type="list">

<list>

<input type="dropdown">

<select>

2 points   

QUESTION 43

Is JavaScript a compiled or an interpreted language?

A compiled language

A interpreted language

Neither

Both

2 points   

QUESTION 44

If my loaded page is http://www.example.com/documents/letter.html?page=2, what will the property of the  location.pathname of the location object contain?

http

www.example.com

page=2

/documents/letter.html

2 points   

QUESTION 45

JavaScript functions are called using:

The function keyword

The call command

The function name, with parentheses

The funciton name only

2 points   

QUESTION 46

Which of these elements are all <table> elements?

<table><tr><tt>

<thead><body><tr>

<table><tr><td>

<table><head><tfoot>

2 points   

QUESTION 47

What statement do you use so that the execution does not fall from one case to the next?

switch

break;

case

default

2 points   

QUESTION 48

Which of the following can you do with JSON?

Create a constructor function

Create an associative array

Directly instantiate an object.

Parse XML data

2 points   

QUESTION 49

Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed?

longdesc

alt

src

title

2 points   

QUESTION 50

What is the correct HTML for inserting an image?

<img src="image.gif" alt="MyImage">

<img href="image.gif" alt="MyImage">

<image src="image.gif" alt="MyImage">

<img alt="MyImage">image.gif</img>

colons

spaces

semicolons

commas

Explanation / Answer

1.When creating an object using a literal, you separate multiple property-value pairs with------?

Ans:Colons

2.Who is making the Web standards?

Ans:The World Wide Web Consortium

3.What is the correct HTML for making a text area?

Ans:<textarea>

4.In DOM, if you want to access the title property of the current document as specified by the HTML <title>...</title> tages, what is the object notation?

Ans:window.document.title

5.Which of following is NOT true statement about variables?

Ans: They can contain numeric or non-numeric information.

6.Create an object that contains name and age.

Ans:var Person = new Person {"name": "John", "age":"32"}

7.Change Bob to Mark in the following array. var names = ["James", "Lisa", "Mike", "Bob"];

Ans:names[3] = "Mark";

8.A ____ variable is one that is declared outside a function and is available to all parts of your program.

Ans:Global

9.What is the correct HTML element for inserting a line break?

Ans:<br>

10.Which method displays a dialog box with an OK button?

Ans:onclick()

11.Which statement sets the value of variable paid to Boolean true?

Ans:var paid = true;

12.What is the correct HTML for creating a hyperlink?

ans:<a href="http://www.w3schools.com">W3Schools</a>

13.What is an onClick event handler?

Ans:A script that executes in response to the user clicking the mouse

14.What is the correct HTML for adding a background color?

Ans:<body>

15.The variables or values that you place in the parentheses of a function call statement are called ?

Ans:arguments

16."In JavaScript programming, you can write your own procedures, called ____, which refer to a related group of JavaScript statements that are executed as a single unit."

Ans:Functions

17.The top level of the DOM hierarchy is occupied by:

Ans:The window object

18.Which HTML element defines the title of a document?

Ans:<title>

19.How can you make a bulleted list?

Ans:<ul>

20.What is the correct HTML for making a text input field?

Ans:<input type="text">

21.For a string called myString containing the value "stupid is as stupid does, " which of the following would return a value of -1?

Ans:myString.indexOf("as stupid");

22.Deriving new objects by using the design of currently existing objects is known as:

Ans:Inheritence

23.A variable defined inside a function definition is called

Ans:Local variable

24.To execute the same statement or command block for all the properties within a custom object, you can use the ____ statement

Ans:for..in

25.A(n) ____ tells the compiler or interpreter that the character that follows it has a special purpose.

Ans:escape character

26.What extra tags must be added to an HTML page to include JavaScript statments?

Ans:<script> and </script>

27.The operator that compares the value and the type is _____.

Ans:==

28.What do you use to enclose the blocks of code in conditionals and loops?

Ans:curly braces

29.Which of the following would send an alert to the viewer that tells the name of the browser being used?

Ans:window.alert("You are using " + navigator.appName);

30.What is the correct HTML for making a checkbox?

Ans:<input type="checkbox">

31.What does HTML stand for?

Ans:Hyper Text Markup Language

32.What could you say about the following code?

myhouse.kitchen = "big";

Ans:Assuming the myhouse object exists, the kitchen property is assigned a new string value of "big" or is initialized with the value "big".

33.Which of the following is likely to cause an infinite loop to occur?

Ans:The condition to terminate the loop is never met.

34.Choose the correct HTML element for the largest heading:

Ans:<h1>

35.You can create a function that will be used as an object method by referring to any object properties it contains with the ____ reference.

Ans:this

36.Which method of the Math object rounds a value to the next lowest integer?

Ans:floor()

37.Which keyword do you use to create a variable?

Ans:var

38.A(n) ____ statement is a statement that returns a value to the statement that called the function.

Ans:return

39.You access an object method with the following syntax:

Ans:objectName.methodName();

40.What happens when a function executes a return statement?

Ans:A value is returned and function execution stops.

41.A new object created from a constructor function is known as:

Ans:an instance of the object

42.What is the correct HTML for making a drop-down list?

Ans:<input type="list">

43.Is JavaScript a compiled or an interpreted language?

Ans:Interpretated language

44.If my loaded page is http://www.example.com/documents/letter.html?page=2, what will the property of the  location.pathname of the location object contain?

Ans:

45.JavaScript functions are called using:

Ans:The function keyword

46.Which of these elements are all <table> elements?

Ans:<table><tr><td>

47.What statement do you use so that the execution does not fall from one case to the next?

Ans:break;

48.Which of the following can you do with JSON?

Ans:Parse XML data

49.Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed?

Ans:alt

50.What is the correct HTML for inserting an image?

Ans:<img src="image.gif" alt="MyImage">

<input type="list">

www.example.com