MCQOPTIONS
Saved Bookmarks
This section includes 18 Mcqs, each offering curated multiple-choice questions to sharpen your Javascript knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
The basic purpose of the toLocaleString() is to _________ |
| A. | return a localised object representation |
| B. | return a parsed string |
| C. | return a local time in the string format |
| D. | return a localized string representation of the object |
| Answer» E. | |
| 2. |
The statement a===b refers to _________ |
| A. | Both a and b are equal in value, type and reference address |
| B. | Both a and b are equal in value |
| C. | Both a and b are equal in value and type |
| D. | There is no such statement |
| Answer» D. There is no such statement | |
| 3. |
What kind of an expression is 'new Point(2,3)'? |
| A. | Primary Expression |
| B. | Object Creation Expression |
| C. | Invocation Expression |
| D. | Constructor Calling Expression |
| Answer» C. Invocation Expression | |
| 4. |
To determine whether one object is the prototype of (or is part of the prototype chain of) another object, one should use the ____________ |
| A. | isPrototypeOf() method |
| B. | equals() method |
| C. | |
| Answer» B. equals() method | |
| 5. |
The enumeration order becomes implementation dependent and non-interoperable if: |
| A. | If the object inherits enumerable properties |
| B. | The object does not have the properties present in the integer array indices |
| C. | The delete keyword is never used |
| D. | Object.defineProperty() is not used |
| Answer» B. The object does not have the properties present in the integer array indices | |
| 6. |
What must be done in order to implement Lexical Scoping? |
| A. | Get the object |
| B. | Dereference the current scope chain |
| C. | Reference the current scope chain |
| D. | Return the value |
| Answer» D. Return the value | |
| 7. |
What is the opposite approach to the lexical scoping? |
| A. | Literal scoping |
| B. | Static scoping |
| C. | Dynamic scoping |
| D. | Generic scoping |
| Answer» D. Generic scoping | |
| 8. |
When an empty statement is encountered, a JavaScript interpreter __________ |
| A. | Ignores the statement |
| B. | Prompts to complete the statement |
| C. | Throws an error |
| D. | Shows a warning |
| Answer» B. Prompts to complete the statement | |
| 9. |
Which of the following Attribute is used to include External JS code inside your HTML Document? |
| A. | src |
| B. | ext |
| C. | script |
| D. | link |
| Answer» B. ext | |
| 10. |
Which of the algorithmic languages is lexical scoping standardized in? |
| A. | Ada |
| B. | Pascal |
| C. | Modula2 |
| D. | All of the mentioned |
| Answer» E. | |
| 11. |
The 'var' and 'function' are __________ |
| A. | Keywords |
| B. | Declaration statements |
| C. | Data types |
| D. | Prototypes |
| Answer» C. Data types | |
| 12. |
The purpose of extensible attribute is to __________ |
| A. | make all of the own properties of that object non configurable |
| B. | to configure and bring a writable property |
| C. | 'lock down' objects into a known state and prevent outside tampering |
| D. | to include new properties into the object |
| Answer» D. to include new properties into the object | |
| 13. |
What is the fundamental rule of lexical scoping? |
| A. | Functions are declared in the scope |
| B. | Functions are executed using scope chain |
| C. | Functions are declared outside the scope |
| D. | Variable are declared within the function |
| Answer» C. Functions are declared outside the scope | |
| 14. |
The main purpose of a “Live Wire” in NetScape is to ________ |
| A. | Create linkage between client side and server side |
| B. | Permit server side, JavaScript code, to connect to RDBMS |
| C. | Support only non relational database |
| D. | To interpret JavaScript code |
| Answer» C. Support only non relational database | |
| 15. |
Assume that we have to convert 'false' that is a non-string to string. The command that we use is (without invoking the 'new' operator) |
| A. | false.toString() |
| B. | String(false) |
| C. | String newvariable='false' |
| D. | Both false.toString() and String(false) |
| Answer» E. | |
| 16. |
JavaScript can be written __________ |
| A. | directly into JS file and included into HTML |
| B. | directly on the server page |
| C. | directly into HTML pages |
| D. | directly into the css file |
| Answer» B. directly on the server page | |
| 17. |
'An expression that can legally appear on the left side of an assignment expression.' is a well known explanation for variables, properties of objects, and elements of arrays. They are called |
| A. | Properties |
| B. | Prototypes |
| C. | Lvalue |
| D. | Definition |
| Answer» D. Definition | |
| 18. |
What is the purpose of the dynamic scoping? |
| A. | Variables can be declared outside the scope |
| B. | Variables must be declared outside the scope |
| C. | Variables cannot be declared outside the scope |
| D. | Variable cannot be declared within the function |
| Answer» B. Variables must be declared outside the scope | |