Deck 11: Javascript: Objects

Full screen (f)
exit full mode
Question
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.
Use Space or
up arrow
down arrow
to flip the card.
Question
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
________ are stored by the browser on the user's computer to maintain client-specific information during and between browser sessions.

A) Files
B) Documents
C) Cookies
D) Substrings
Question
Which of the following methods would you use to convert a list of Unicode values into a string containing the corresponding characters

A) charAt
B) charCodeAt
C) fromCharCode
D) UCodeToChar
Question
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
A JSON object is represented as a list contained in _____.

A) curly braces
B) square brackets
C) single quotes
D) double quotes
Question
Which of the following is not a method

A) getTime()
B) strike()
C) getMonth()
D) valueOf()
Question
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
Which of the following is a mathematical constant

A) sqrt( x )
B) cos( x )
C) floor( x )
D) Math.LN10
Question
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
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
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
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
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
To find out when a document was last modified, use the document object's _____ property.

A) lastModified
B) lastChanged
C) modDate
D) dateChanged
Question
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
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/16
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 11: Javascript: Objects
1
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.
A
2
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.
C
3
________ are stored by the browser on the user's computer to maintain client-specific information during and between browser sessions.

A) Files
B) Documents
C) Cookies
D) Substrings
C
4
Which of the following methods would you use to convert a list of Unicode values into a string containing the corresponding characters

A) charAt
B) charCodeAt
C) fromCharCode
D) UCodeToChar
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
5
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.
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
6
A JSON object is represented as a list contained in _____.

A) curly braces
B) square brackets
C) single quotes
D) double quotes
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
7
Which of the following is not a method

A) getTime()
B) strike()
C) getMonth()
D) valueOf()
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
8
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
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
9
Which of the following is a mathematical constant

A) sqrt( x )
B) cos( x )
C) floor( x )
D) Math.LN10
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
10
Which of the following is not a method or property of the JavaScript Number object

A) toString
B) toFloat
C) valueOf
D) MAX_VALUE
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
11
Which of the following methods would you use to search a string for a specific character

A) substring
B) charAt
C) substr
D) indexOf
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
12
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
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
13
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
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
14
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.
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
15
To find out when a document was last modified, use the document object's _____ property.

A) lastModified
B) lastChanged
C) modDate
D) dateChanged
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
16
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
Unlock Deck
Unlock for access to all 16 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 16 flashcards in this deck.