prototype stack
prototype chain
prototype class
prototypes
B. prototype chain
Prints an exception error
Prints an overflow error
Displays Infinity
Prints the value as such
o.m=m.f;
o.m=f;
o=f.m;
o=f;
isarrayType()
==
===
typeof
High level programming language
Assembly level programming language
Machine level programming language
Low level programming language
parse
a sync
defer
type
for(var num=10;num>=1;num--)
{
document.writeln(num);
}
var num=10;
while(num>=1)
{
document.writeln(num);
num++;
}
Code 1
Code 2
Both Code 1 and Code 2
Cannot Compare
the head tag
the head or body
the title or head
after the body tag
Identifier and Parentheses
Return type and Identifier
Return type, Function keyword, Identifier and Parentheses
Identifier and Return type
const object1 = {};
a = Symbol('a');
b = Symbol.for('b');
object1[a] = 'harry';
object1[b] = 'derry';
const objectSymbols = Object.getOwnPropertySymbols(object1);
console.log(objectSymbols.length);
0
2
1
Error
function printArray(a)
{
var len = a.length, i = 0;
if (len == 0)
console.log(Empty Array);
else
{
do
{
console.log(a[i]);
} while (++i < len);
}
}
Prints the numbers in the array in order
Prints the numbers in the array in the reverse order
Prints 0 to the length of the array
Prints Empty Array
The interpreter stops its work
The interpreter throws another exception
The interpreter jumps to the nearest enclosing exception handler
The interpreter throws an error
function range(int length)
{
int a=5;
for(int i=0;i<length;i++)
{
console.log(a);
}
}
range(3);
5
555
3
error
make computations in HTML simpler
minimize storage requirements on the web server
increase the download time for the client
increase the loading time of the website
var a1 = [,,,];
var a2 = new Array(3);
0 in a1
0 in a2
true false
false true
true true
false true
function tail(o)
{
for (; o.next; o = o.next) ;
return o;
}
No, this will throw an exception as only numerics can be used in a for loop
No, this will not iterate
Yes, this will work
No, this will result in a runtime error with the message Cannot use Linked List
It is mandatory
Not necessary
Few functions return values by default
some functions do not return any value
The interpreter stops its work
The interpreter throws another exception
The interpreter jumps to the nearest enclosing exception handler
The interpreter throws an error
for(var p in o)
console.log(o[p]);
for (var i = 0;i < a.length;i++)
console.log(a[i]);
for (int i = 0;i < a.length;i++)
console.log(a[i]);
for (var i = 0;i <= a.length;i++)
console.log(a[i]);
for (var i = 1;i < a.length;i++)
console.log(a[i]);
var a= 0;
var b = 0;
while (a < 3)
{
a++;
b += a;
console.log(b);
}
135
123
013
01
function output(option)
{
return (option ? yes : no);
}
bool ans=true;
console.log(output(ans));
Yes
No
Runtime error
Compilation error
Controlled loop constructs
Case checking constructs
Validation constructs
All of the mentioned
var tensquared = (function(x) {return x*x;}(10));
Yes, perfectly
Error
Exception will be thrown
Memory leak
Keywords
Declaration statements
Data types
Prototypes
filter and fold
inject and fold
finger and fold
fold
switch(expression)
{
statements
}
==
equals
equal
===
make all of the own properties of that object non configurable
to configure and bring a writable property
lock down objects into a known state and prevent outside tampering
to include new properties into the object
var text = testing: 1, 2, 3; // Sample text
var pattern = /d+/g // Matches all instances of one or more digits
text==pattern
text.equals(pattern)
text.test(pattern)
pattern.test(text)
String
Object
Serialized Object
Array
The property will be stored in a cache
The loop will not run
That property will not be enumerated
The property will be enumerated
1.01
1.047
1.00
1.4