- Javascript Basics Tutorial
- Javascript - Home
- JavaScript - Overview
- JavaScript - Features
- JavaScript - Enabling
- JavaScript - Placement
- JavaScript - Syntax
- JavaScript - Hello World
- JavaScript - Console.log()
- JavaScript - Comments
- JavaScript - Variables
- JavaScript - let Statement
- JavaScript - Constants
- JavaScript - Data Types
- JavaScript - Type Conversions
- JavaScript - Strict Mode
- JavaScript - Reserved Keywords
- JavaScript Operators
- JavaScript - Operators
- JavaScript - Arithmetic Operators
- JavaScript - Comparison Operators
- JavaScript - Logical Operators
- JavaScript - Bitwise Operators
- JavaScript - Assignment Operators
- JavaScript - Conditional Operators
- JavaScript - typeof Operator
- JavaScript - Nullish Coalescing Operator
- JavaScript - Delete Operator
- JavaScript - Comma Operator
- JavaScript - Grouping Operator
- JavaScript - Yield Operator
- JavaScript - Spread Operator
- JavaScript - Exponentiation Operator
- JavaScript - Operator Precedence
- JavaScript Control Flow
- JavaScript - If...Else
- JavaScript - While Loop
- JavaScript - For Loop
- JavaScript - For...in
- Javascript - For...of
- JavaScript - Loop Control
- JavaScript - Break Statement
- JavaScript - Continue Statement
- JavaScript - Switch Case
- JavaScript - User Defined Iterators
- JavaScript Functions
- JavaScript - Functions
- JavaScript - Function Expressions
- JavaScript - Function Parameters
- JavaScript - Default Parameters
- JavaScript - Function() Constructor
- JavaScript - Function Hoisting
- JavaScript - Self-Invoking Functions
- JavaScript - Arrow Functions
- JavaScript - Function Invocation
- JavaScript - Function call()
- JavaScript - Function apply()
- JavaScript - Function bind()
- JavaScript - Closures
- JavaScript - Variable Scope
- JavaScript - Global Variables
- JavaScript - Smart Function Parameters
- JavaScript Objects
- JavaScript - Number
- JavaScript - Boolean
- JavaScript - Strings
- JavaScript - Arrays
- JavaScript - Date
- JavaScript - Math
- JavaScript - RegExp
- JavaScript - Symbol
- JavaScript - Sets
- JavaScript - WeakSet
- JavaScript - Maps
- JavaScript - WeakMap
- JavaScript - Iterables
- JavaScript - Reflect
- JavaScript - TypedArray
- JavaScript - Template Literals
- JavaScript - Tagged Templates
- Object Oriented JavaScript
- JavaScript - Objects
- JavaScript - Classes
- JavaScript - Object Properties
- JavaScript - Object Methods
- JavaScript - Static Methods
- JavaScript - Display Objects
- JavaScript - Object Accessors
- JavaScript - Object Constructors
- JavaScript - Native Prototypes
- JavaScript - ES5 Object Methods
- JavaScript - Encapsulation
- JavaScript - Inheritance
- JavaScript - Abstraction
- JavaScript - Polymorphism
- JavaScript - Destructuring Assignment
- JavaScript - Object Destructuring
- JavaScript - Array Destructuring
- JavaScript - Nested Destructuring
- JavaScript - Optional Chaining
- JavaScript - Global Object
- JavaScript - Mixins
- JavaScript - Proxies
- JavaScript Versions
- JavaScript - History
- JavaScript - Versions
- JavaScript - ES5
- JavaScript - ES6
- ECMAScript 2016
- ECMAScript 2017
- ECMAScript 2018
- ECMAScript 2019
- ECMAScript 2020
- ECMAScript 2021
- ECMAScript 2022
- JavaScript Cookies
- JavaScript - Cookies
- JavaScript - Cookie Attributes
- JavaScript - Deleting Cookies
- JavaScript Browser BOM
- JavaScript - Browser Object Model
- JavaScript - Window Object
- JavaScript - Document Object
- JavaScript - Screen Object
- JavaScript - History Object
- JavaScript - Navigator Object
- JavaScript - Location Object
- JavaScript - Console Object
- JavaScript Web APIs
- JavaScript - Web API
- JavaScript - History API
- JavaScript - Storage API
- JavaScript - Forms API
- JavaScript - Worker API
- JavaScript - Fetch API
- JavaScript - Geolocation API
- JavaScript Events
- JavaScript - Events
- JavaScript - DOM Events
- JavaScript - addEventListener()
- JavaScript - Mouse Events
- JavaScript - Keyboard Events
- JavaScript - Form Events
- JavaScript - Window/Document Events
- JavaScript - Event Delegation
- JavaScript - Event Bubbling
- JavaScript - Event Capturing
- JavaScript - Custom Events
- JavaScript Error Handling
- JavaScript - Error Handling
- JavaScript - try...catch
- JavaScript - Debugging
- JavaScript - Custom Errors
- JavaScript - Extending Errors
- JavaScript Important Keywords
- JavaScript - this Keyword
- JavaScript - void Keyword
- JavaScript - new Keyword
- JavaScript - var Keyword
- JavaScript HTML DOM
- JavaScript - HTML DOM
- JavaScript - DOM Methods
- JavaScript - DOM Document
- JavaScript - DOM Elements
- JavaScript - DOM Forms
- JavaScript - Changing HTML
- JavaScript - Changing CSS
- JavaScript - DOM Animation
- JavaScript - DOM Navigation
- JavaScript - DOM Collections
- JavaScript - DOM Node Lists
- JavaScript Miscellaneous
- JavaScript - Ajax
- JavaScript - Async Iteration
- JavaScript - Atomics Objects
- JavaScript - Rest Parameter
- JavaScript - Page Redirect
- JavaScript - Dialog Boxes
- JavaScript - Page Printing
- JavaScript - Validations
- JavaScript - Animation
- JavaScript - Multimedia
- JavaScript - Image Map
- JavaScript - Browsers
- JavaScript - JSON
- JavaScript - Multiline Strings
- JavaScript - Date Formats
- JavaScript - Get Date Methods
- JavaScript - Set Date Methods
- JavaScript - Modules
- JavaScript - Dynamic Imports
- JavaScript - BigInt
- JavaScript - Blob
- JavaScript - Unicode
- JavaScript - Shallow Copy
- JavaScript - Call Stack
- JavaScript - Reference Type
- JavaScript - IndexedDB
- JavaScript - Clickjacking Attack
- JavaScript - Currying
- JavaScript - Graphics
- JavaScript - Canvas
- JavaScript - Debouncing
- JavaScript - Performance
- JavaScript - Style Guide
- JavaScript Useful Resources
- JavaScript - Questions And Answers
- JavaScript - Quick Guide
- JavaScript - Functions
- JavaScript - Resources
Javascript Mock Test
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.
Javascript Mock Test III
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?
Answer : D
Explanation
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?
Answer : A
Explanation
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?
Answer : A
Explanation
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?
Answer : B
Explanation
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?
Answer : C
Explanation
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?
Answer : D
Explanation
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?
Answer : A
Explanation
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?
Answer : B
Explanation
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?
Answer : C
Explanation
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?
Answer : D
Explanation
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?
Answer : A
Explanation
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?
Answer : B
Explanation
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?
Answer : A
Explanation
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?
Answer : B
Explanation
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?
Answer : C
Explanation
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.
Answer : D
Explanation
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?
Answer : A
Explanation
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?
Answer : B
Explanation
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?
Answer : C
Explanation
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?
Answer : D
Explanation
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?
Answer : A
Explanation
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?
Answer : B
Explanation
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?
Answer : C
Explanation
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?
Answer : D
Explanation
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?
Answer : A
Explanation
link() − Creates an HTML hypertext link that requests another URL.
Answer Sheet
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 |