79). The unordered collection of properties, each of which has a name and a value is called _________

[A]String
[B]Object
[C]Serialized Object
[D]Array

Show Answer

80). The object has three object attributes namely ________

[A]Class, parameters, object’s extensible flag
[B]Prototype, class, objects’ parameters
[C] Prototype, class, object’s extensible flag
[D]Native object, Classes and Interfaces and Object’s extensible flag

Show Answer

81). What will be the firstname and surname of the following JavaScript code?
var book = {
              "main title": "JavaScript", 
              'sub-title': "The Definitive Guide", 
              "for": "all audiences", 
              author: { 
                         firstname: "David", 
                         surname: "Flanagan" 
                      }
           };

[A]properties
[B]property values
[C]property names
[D]objects

Show Answer

82). A linkage of series of prototype objects is called as ________
var book = {
              "main title": "JavaScript", 
              'sub-title': "The Definitive Guide", 
              "for": "all audiences", 
              author: { 
                         firstname: "David", 
                         surname: "Flanagan" 
                      }
           };

[A]prototype stack
[B]prototype chain
[C]prototype class
[D] prototypes

Show Answer

83). In the following syntax, the data type within the square brackets must be ___________
book[datatype]=assignment_value;

[A]An integer
[B]A String
[C]An object
[D]Floating point

Show Answer

84). To determine whether one object is the prototype of (or is part of the prototype chain of) another object, one should use the ____________
book[datatype]=assignment_value;

[A]isPrototypeOf() method
[B]equals() method
[C]=== operator
[D]==opertor

Show Answer

85). What is the prototype represents in the following JavaScript code snippet?
function f() {};

[A]Function f
[B] A custom constructor
[C]Prototype of a function
[D]Not valid

Show Answer

86). The purpose of extensible attribute is to __________
function f() {};

[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

Show Answer

87). Identify the process done in the following JavaScript code snippet?
o = {x:1, y:{z:[false,null,""]}}; 
s = JSON.stringify(o); 
p = JSON.parse(s);

[A] Object Encapsulation
[B]Object Serialization
[C]Object Abstraction
[D]Object Encoding

Show Answer

88). The basic purpose of the toLocaleString() is to _________
o = {x:1, y:{z:[false,null,""]}}; 
s = JSON.stringify(o); 
p = JSON.parse(s);

[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

Show Answer

89). What will be the output of the following JavaScript code?
const object1 = {};  
a = Symbol('a');  
b = Symbol.for('b');  
object1[a] = 'harry';  
object1[b] = 'derry';  
const objectSymbols = Object.getOwnPropertySymbols(object1);  
console.log(objectSymbols.length);

[A]0
[B]2
[C]1
[D]Error

Show Answer

90). What will be the output of the following JavaScript code?
const obj1 =
{  
    property1: 21  
}  
const descriptor1 = Object.getOwnPropertyDescriptor(obj1, 'property1');  
console.log(descriptor1.configurable);  
console.log(descriptor1.enumerable);

[A]true 21
[B]true false
[C] true true
[D]false false

Show Answer

91). What will be the output of the following JavaScript code?
const obj1 = { property1: '10'};  
const obj2 = Object.freeze(obj1);  
obj2.property1 = '20';  
console.log(obj2.property1);

[A]10
[B]20
[C]Runtime error
[D]Compilation error

Show Answer

92). What will be the output of the following JavaScript code?
const object1 = {  
  property1: 20
};  
console.log(Object.is(object1));

[A]20
[B]true
[C]false
[D]error

Show Answer

93). What will be the output of the following JavaScript code?
const obj = {prop: 12};  
Object.preventExtensions(obj);  
console.log( Object.isExtensible(obj));

[A]12
[B]false
[C]true
[D]error

Show Answer