This section presents you various set of Mock Tests related to Javascript Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - Which of the following function of String object returns the index within the calling String object of the first occurrence of the specified value?
indexOf() − Returns the index within the calling String object of the first occurrence of the specified value, or -1 if not found.
Q 2 - Which of the following function of String object returns the index within the calling String object of the last occurrence of the specified value?
lastIndexOf() − Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found.
Q 3 - Which of the following function of String object returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order?
localeCompare() − Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order.
Q 4 - Which of the following function of String object is used to match a regular expression against a string?
match() − Used to match a regular expression against a string.
Q 5 - Which of the following function of String object is used to find a match between a regular expression and a string, and to replace the matched substring with a new substring?
replace() − Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.
Q 6 - Which of the following function of String object executes the search for a match between a regular expression and a specified string?
search() − Executes the search for a match between a regular expression and a specified string.
Q 7 - Which of the following function of String object extracts a section of a string and returns a new string?
slice() − Extracts a section of a string and returns a new string.
Q 8 - Which of the following function of String object splits a String object into an array of strings by separating the string into substrings?
split() − Splits a String object into an array of strings by separating the string into substrings.
Q 9 - Which of the following function of String object returns the characters in a string beginning at the specified location through the specified number of characters?
substr() − Returns the characters in a string beginning at the specified location through the specified number of characters.
Q 10 - Which of the following function of String object returns the characters in a string between two indexes into the string?
substring() − Returns the characters in a string between two indexes into the string.
Q 11 - Which of the following function of String object returns the calling string value converted to lower case while respecting the current locale?
toLocaleLowerCase() − Returns the calling string value converted to lower case while respecting the current locale.
Q 12 - Which of the following function of String object returns the calling string value converted to lower case?
toLowerCase() − Returns the calling string value converted to lower case.
Q 13 - Which of the following function of String object returns the calling string value converted to upper case while respecting the current locale?
toLocaleUpperCase() − Returns the calling string value converted to upper case while respecting the current locale.
Q 14 - Which of the following function of String object returns the calling string value converted to upper case?
toUpperCase() − Returns the calling string value converted to upper case.
Q 15 - Which of the following function of String object returns a string representing the specified object?
toString() − Returns a string representing the specified object.
Q 16 - Which of the following function of String object returns the primitive value of the specified object.
valueOf() − Returns the primitive value of the specified object.
Q 17 - Which of the following function of String object creates an HTML anchor that is used as a hypertext target?
anchor() − Creates an HTML anchor that is used as a hypertext target.
Q 18 - Which of the following function of String object creates a string to be displayed in a big font as if it were in a <big> tag?
big() − Creates a string to be displayed in a big font as if it were in a <big> tag.
Q 19 - Which of the following function of String object creates a string to blink as if it were in a <blink> tag?
blink() − Creates a string to blink as if it were in a <blink> tag.
Q 20 - Which of the following function of String object creates a string to be displayed as bold as if it were in a <b> tag?
bold() − Creates a string to be displayed as bold as if it were in a <b> tag.
Q 21 - Which of the following function of String object causes a string to be displayed in fixed-pitch font as if it were in a <tt> tag?
fixed() − Causes a string to be displayed in fixed-pitch font as if it were in a <tt> tag.
Q 22 - Which of the following function of String object causes a string to be displayed in the specified color as if it were in a <font color='color'> tag?
fontcolor() − Causes a string to be displayed in the specified color as if it were in a <font color = 'color'> tag.
Q 23 - Which of the following function of String object causes a string to be displayed in the specified size as if it were in a <font size = 'size'> tag?
fontsize() − Causes a string to be displayed in the specified size as if it were in a <font size = 'size'> tag.
Q 24 - Which of the following function of String object causes a string to be italic, as if it were in an <i> tag?
italics() − Causes a string to be italic, as if it were in an <i> tag.
Q 25 - Which of the following function of String object creates an HTML hypertext link that requests another URL?
link() − Creates an HTML hypertext link that requests another URL.
Question Number | Answer Key |
---|---|
1 | D |
2 | A |
3 | A |
4 | B |
5 | C |
6 | D |
7 | A |
8 | B |
9 | C |
10 | D |
11 | A |
12 | B |
13 | A |
14 | B |
15 | C |
16 | D |
17 | A |
18 | B |
19 | C |
20 | D |
21 | A |
22 | B |
23 | C |
24 | D |
25 | A |