- 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 II
Q 1 - Which built-in method calls a function for each element in the array?
Answer : C
Explanation
forEach() method calls a function for each element in the array.
Q 2 - Which built-in method returns the index within the calling String object of the first occurrence of the specified value?
Answer : C
Explanation
indexOf() method returns the index within the calling String object of the first occurrence of the specified value, or -1 if not found.
Q 3 - Which built-in method returns the length of the string?
Answer : A
Explanation
length() method returns the length of the string.
Q 4 - Which built-in method removes the last element from an array and returns that element?
Answer : C
Explanation
pop() method removes the last element from an array and returns that element.
Q 5 - Which built-in method adds one or more elements to the end of an array and returns the new length of the array?
Answer : C
Explanation
push() method adds one or more elements to the end of an array and returns the new length of the array.
Q 6 - Which built-in method reverses the order of the elements of an array?
Answer : B
Explanation
reverse() method reverses the order of the elements of an array -- the first becomes the last, and the last becomes the first.
Q 7 - Which built-in method sorts the elements of an array?
Answer : C
Explanation
sort() method sorts the elements of an array.
Q 8 - Which built-in method returns the characters in a string beginning at the specified location?
Answer : A
Explanation
substr() method returns the characters in a string beginning at the specified location through the specified number of characters.
Q 9 - Which built-in method returns the calling string value converted to lower case?
Answer : A
Explanation
toLowerCase() method returns the calling string value converted to lower case.
Q 10 - Which built-in method returns the calling string value converted to upper case?
Answer : A
Explanation
toUpperCase() method returns the calling string value converted to upper case.
Q 11 - Which built-in method returns the string representation of the number's value?
Answer : C
Explanation
toString() method returns the string representation of the number's value.
Q 12 - All user-defined objects and built-in objects are descendants of an object called Object?
Answer : A
Explanation
All user-defined objects and built-in objects are descendants of an object called Object.
Q 13 - Which of the following code creates an object?
Answer : B
Explanation
var book = new Object(); creates an object.
Q 14 - Which of the following function of Number object forces a number to display in exponential notation?
Answer : A
Explanation
toExponential(): Forces a number to display in exponential notation, even if the number is in the range in which JavaScript normally uses standard notation.
Q 15 - Which of the following function of Number object formats a number with a specific number of digits to the right of the decimal?
Answer : B
Explanation
toFixed() − Formats a number with a specific number of digits to the right of the decimal.
Q 16 - Which of the following function of Number object returns a string value version of the current number in a format that may vary according to a browser's locale settings.?
Answer : C
Explanation
toLocaleString() − Returns a string value version of the current number in a format that may vary according to a browser's locale settings.
Q 17 - Which of the following function of Number object defines how many total digits to display of a number?
Answer : D
Explanation
toPrecision() − Defines how many total digits (including digits to the left and right of the decimal) to display of a number.
Q 18 - Which of the following function of Number object returns a string value version of the current number?
Answer : A
Explanation
toString() − Returns a string value version of the current number.
Q 19 - Which of the following function of Number object returns the number's value?
Answer : B
Explanation
valueOf() − Returns the number's value.
Q 20 - Which of the following function of Boolean object returns a string containing the source of the Boolean object?
Answer : A
Explanation
toSource() − Returns a string containing the source of the Boolean object; you can use this string to create an equivalent object.
Q 21 - Which of the following function of Boolean object returns the primitive value of the Boolean object?
Answer : B
Explanation
valueOf() − Returns the primitive value of the Boolean object.
Q 22 - Which of the following function of Boolean object returns a string of either 'true' or 'false' depending upon the value of the object?
Answer : C
Explanation
toString() − Returns a string of either 'true' or 'false' depending upon the value of the object.
Q 23 - Which of the following function of String object returns the character at the specified index?
Answer : A
Explanation
charAt() − Returns the character at the specified index.
Q 24 - Which of the following function of String object returns a number indicating the Unicode value of the character at the given index?
Answer : B
Explanation
charCodeAt() − Returns a number indicating the Unicode value of the character at the given index.
Q 25 - Which of the following function of String object combines the text of two strings and returns a new string?
Answer : C
Explanation
concat() − Combines the text of two strings and returns a new string.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | C |
2 | C |
3 | A |
4 | C |
5 | C |
6 | B |
7 | C |
8 | A |
9 | A |
10 | A |
11 | C |
12 | A |
13 | B |
14 | A |
15 | B |
16 | C |
17 | D |
18 | A |
19 | B |
20 | A |
21 | B |
22 | C |
23 | A |
24 | B |
25 | C |
To Continue Learning Please Login
Login with Google