QuestionQuestion

Question 1
What does the variable string contain after the following code is executed?
var string = "Good luck on the test";
string = string.charAt( 3 );
a. Goo
b. 3
c. d
d. Nothing, the string conversion generates an error.

Question 2
What does the variable string contain after the following code is executed?
var string = "Good luck on the test";
string = string.link("www.deitel.com");
a. a link to www.deitel.com with the text "www.deitel.com"
b. a link to www.deitel.com with the text "Good luck on the test"
c. the text "www.deitel.com"
d. Nothing, the string conversion will generate an error.

Question 3
JavaScript is a(n) ________ language.
a. object-oriented
b. procedural
c. functional
d. object-based

Question 4
Which of the following is not a method?
a. getTime()
b. strike()
c. getMonth()
d. valueOf()

Question 5
What is the value of s1 after the following code is executed?
var s1 = "deitel and associates";
s1 = s1.slice( 6 );
a. deitel
b. deitel and asso
c. and associates
d. deitel and associates

Question 6
Which of the following is a mathematical constant?
a. sqrt( x )
b. cos( x )
c. floor( x )
d. Math.LN10

Question 7
What is the value of s3 after the following code is executed?
var s1 = "one";
var s2 = "two";
var s3 = "three";
s1.concat( s2 );
s3 = s1;
a. one
b. onetwo
c. three
d. onetwothree

Question 8
An object's methods are accessed by writing the name of the object immediately followed by a ________.
a. method name
b. method index
c. dot
d. property operator

Question 9
What does the variable string contain after the following code is executed?
var string = "Good luck on the test";
string = string.split( " " );
a. an array containing the strings "Good", "luck", "on", "the" and"test"
b. the string "Good.luck.on.the.test"
c. the string "Good,luck,on,the,test"
d. Nothing, the string conversion will generate an error.

Question 10
Which of the following methods would you use to search a string for a specific character?
a. substring
b. charAt
c. substr
d. indexOf
............................................

Question 1
What will variable value contain after the following code is executed?
var value = new Date();
value = value.valueOf();

a. the current date in the format hh:mm:ss calculated from the number of milliseconds between midnight January 1, 1970 and the current date
b. a large integer representing the number of milliseconds between midnight January 1, 1970 and the current date
c. the current date in the format hh:mm calculated from the number of milliseconds between midnight January 1, 1970 and the current date
d. a large floating point number representing the number of milliseconds between midnight January 1, 1970 and the current date

Question 2
To refer to the parent of a window, access the child window's _____ property.
a. opener
b. parent
c. owner
d. child

Question 3
Cookies for a website may be found by reading the document object's _____ property.
a. cookie
b. cookies
c. values
d. cookieData

Question 4
To delete a cookie, set its expires property to _____.
a. null
b. a date and time in the past
c. a date and time in the future
d. an invalid date and time

Question 5
To find out when a document was last modified, use the document object's _____ property.
a. lastModified
b. lastChanged
c. modDate
d. dateChanged

Question 6
Which of the following is not a method or property of the JavaScript Number object?
a. toString
b. toFloat
c. valueOf
d. MAX_VALUE

Question 7
A JSON object is represented as a list contained in _____.
a. curly braces
b. square brackets
c. single quotes
d. double quotes

Question 8
Which of the following is not a method of the JavaScript Boolean object?
a. toString
b. valueOf
c. toInt
d. The JavaScript Boolean object does not possess publicly accessible methods.

Question 9
Multiple cookies from the same website are seperated by _____.
a. hyphens
b. commas
c. semicolons
d. None of the above

Question 10
The window object includes the method _____ for creating new browser windows.
a. new
b. open
c. create
d. spawn

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Question 1: The answer is option C.
Question 2: The answer is option B.
Question 3: The answer is option D....
$30.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Web Development (HTML, XML, PHP, JavaScript, Adobe, Flash, etc.) Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats