 
			 
			MCQOPTIONS
 Saved Bookmarks
				This section includes 15 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
| 1. | JavaScript provides a special constructor function called Object() to build the object. | 
| A. | TRUE | 
| B. | FALSE | 
| C. | Can be true or false | 
| D. | Can not say | 
| E. | |
| Answer» B. FALSE | |
| 2. | The ________ operator is used to create an instance of an object. | 
| A. | this | 
| B. | self | 
| C. | find | 
| D. | new | 
| Answer» E. | |
| 3. | The syntax for adding a property to an object is? | 
| A. | objectProperty == propertyValue; | 
| B. | objectProperty = propertyValue; | 
| C. | objectName.objectProperty = propertyValue; | 
| D. | objectName.objectProperty == propertyValue; | 
| Answer» D. objectName.objectProperty == propertyValue; | |
| 4. | The capability to store one object inside another object known as? | 
| A. | Encapsulation | 
| B. | Aggregation | 
| C. | Inheritance | 
| D. | Polymorphism | 
| Answer» C. Inheritance | |
| 5. | const event = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));console.log (event.toLocaleString('en-IN', { timeZone: 'UTC' }));11.A programming language can be called object-oriented if it provides ________ basic capabilities to developers | 
| A. | 1 | 
| B. | 2 | 
| C. | 3 | 
| D. | 4 | 
| Answer» E. | |
| 6. | what will be the output of below code? | 
| A. | 20/12/2012, 3:00:00 | 
| B. | 12/20/2012, 3:00:00 | 
| C. | 20/12/2012, 3:00:00 am | 
| D. | 2012/12/20, 3:00:00 am | 
| Answer» D. 2012/12/20, 3:00:00 am | |
| 7. | If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph? | 
| A. | "New Text"? | 
| B. | para1.value="New Text"; | 
| C. | para1.firstChild.nodeValue= "New Text"; | 
| D. | para1.nodeValue="New Text"; | 
| Answer» C. para1.firstChild.nodeValue= "New Text"; | |
| 8. | Object ......... is the process of converting an objects state to a string from which it can later be restored. | 
| A. | prototype | 
| B. | class | 
| C. | serialization | 
| D. | extensible | 
| Answer» D. extensible | |
| 9. | var todaysDate = new Date()console.log( todaysDate.toLocaleString() );7......... serializes only the enumerable own properties of an object. | 
| A. | JSON.Parse() | 
| B. | JSON.Stringify() | 
| C. | JSON.Null() | 
| D. | JSON.Objectify() | 
| Answer» C. JSON.Null() | |
| 10. | var val = "JavaScript String"splittedVal = val.split('a',2)console.log(splittedVal);6.what will be the output of below code? NOTE: The code is executed on 2019-5-9 | 
| A. | 2019-05-09T09:29:53.181Z | 
| B. | 2019-5-9 | 
| C. | 15:00:34 | 
| D. | 2019-5-9 15:02:35 | 
| Answer» E. | |
| 11. | var materials = [ 'Table', 'Chair', 'Boxes', 'Press'];console.log(materials.map (material => material.length));5.what will be the output of below code? | 
| A. | [ 'J', 'v' ] | 
| B. | [ 'J' ,'v','Script'] | 
| C. | [ 'J', 'v', 'Script String' ] | 
| D. | [ 'JavaScript String' ] | 
| Answer» B. [ 'J' ,'v','Script'] | |
| 12. | var materials = [ 'Hydrogen', 'Helium', 'Lithium', 'Beryllium'];console.log(materials.map (material => material.length));4.What will be printed in the console on execution of the below code? | 
| A. | [5,5,5,5] | 
| B. | [5]{4} | 
| C. | [5] | 
| D. | Both A and B | 
| Answer» B. [5]{4} | |
| 13. | var array = [2, 4, 6, 7, 8, 10];var myArr= array.filter(v => v / 2 === 0);console.log(myArr);3.What will be printed in the console on execution of the below code? | 
| A. | [8, 6, 7, 9] | 
| B. | 4 | 
| C. | [4] | 
| D. | 8, 6, 7, 9 | 
| Answer» B. 4 | |
| 14. | var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];var myArr= array.filter(v => v % 3 === 0);console.log(myArr);2.What will be printed in the console on execution of the following JS code: | 
| A. | myArr | 
| B. | [2, 4, 6, 7, 8, 10] | 
| C. | [2, 4, 6, 8, 10] | 
| D. | [7] | 
| Answer» D. [7] | |
| 15. | What will be printed in the console on execution of the following JS code: | 
| A. | myArr | 
| B. | [3, 6, 9, 12, 15] | 
| C. | [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | 
| D. | [1, 2, 4, 5, 7, 8, 10, 11, 13, 14] | 
| Answer» C. [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |