Objects in Javascript

@T-Bone

This question paper focuses on the "Objects" of Javascript. These Multiple Choice Questions (mcq) should be practiced to improve the Javascript skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

This question paper focuses on the "Objects" of Javascript. These Multiple Choice Questions (mcq) should be practiced to improve the Javascript skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

Questions

1. What will be printed in the console on execution of the following JS code: 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);

Mark the correct option

2. What will be printed in the console on execution of the following JS code: var array = [2, 4, 6, 7, 8, 10]; var myArr= array.filter(v => v / 2 === 0); console.log(myArr);

Mark the correct option

3. What will be printed in the console on execution of the below code? var materials = [ 'Hydrogen', 'Helium', 'Lithium', 'Beryllium' ]; console.log(materials.map (material => material.length));

Mark the correct option

4. What will be printed in the console on execution of the below code? var materials = [ 'Table', 'Chair', 'Boxes', 'Press' ]; console.log(materials.map (material => material.length));

Mark the correct option

5. what will be the output of below code? var val = "JavaScript String" splittedVal = val.split('a',2) console.log(splittedVal);

Mark the correct option

6. what will be the output of below code? NOTE: The code is executed on 2019-5-9 var todaysDate = new Date() console.log( todaysDate.toLocaleString() );

Mark the correct option

7. ........ serializes only the enumerable own properties of an object.

Mark the correct option

8. Object ......... is the process of converting an object’s state to a string from which it can later be restored.

Mark the correct option

9. If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?

Mark the correct option

10. what will be the output of below code? const event = new Date(Date.UTC(2012, 11, 20, 3, 0, 0)); console.log (event.toLocaleString('en-IN', { timeZone: 'UTC' }));

Mark the correct option

11. A programming language can be called object-oriented if it provides ________ basic capabilities to developers

Mark the correct option

12. The capability to store one object inside another object known as?

Mark the correct option

13. The syntax for adding a property to an object is?

Mark the correct option

14. The ________ operator is used to create an instance of an object.

Mark the correct option

15. JavaScript provides a special constructor function called Object() to build the object.

Mark the correct option

Index of Questions