The interpreter stops its work
The interpreter throws another exception
The interpreter jumps to the nearest enclosing exception handler
The interpreter throws an error
C. The interpreter jumps to the nearest enclosing exception handler
Controlled loop constructs
Case checking constructs
Validation constructs
All of the mentioned
return a localised object representation
return a parsed string
return a local time in the string format
return a localized string representation of the object
Reverses and stores in the same array
Reverses and concatenates the elements of the array
Reverses
Stores the elements of an array in normal order
function f() {};
Function f
A custom constructor
Prototype of a function
Not valid
o(x,y);
o.m(x) && o.m(y);
m(x,y);
o.m(x,y);
function height()
{
var height = 123.56;
var type = (height>=190) ? tall : short;
return type;
}
123.56
190
tall
short
debugger
with
if
use strict
function constfuncs()
{
var funcs = [];
for(var i = 0; i < 10; i++)
funcs[i] = function() { return i; };
return funcs;
}
var funcs = constfuncs();
funcs[5]()
9
0
10
None of the mentioned
var grade='A';
var result;
switch(grade)
{
case 'A':
result+=10;
case 'B':
result+= 9;
case 'C':
result+= 8;
default:
result+= 0;
}
document.write(result);
10
27
8
0
var arr = [7, 5, 9, 1];
var min = Math.min.apply(null, arr);
document.writeln(min);
7
5
1
9
Properties
Prototypes
Lvalue
Definition
var count = [1,,3];
The omitted value takes undefined
This results in an error
This results in an exception
The omitted value takes an integer value
Updation, Incrementation, Initialization
Initialization,Testing, Updation
Testing, Updation, Testing
Initialization,Testing, Incrementation
Int a=1;
if(a>10)
{
document.write(10);
}
else
{
document.write(a);
}
10
0
1
Undefined
int a==2;
int b=4;
int ans=a+b;
print(ans);
2
6
0
error
+
:
^
?:
var add=new Function(num1,num2,return num1+num2);
document.writeln(add(2,5));
2
5
Error
7
Int a=1;
if(a>10)
{
document.write(10);
}
else
{
document.write(a);
}
10
0
1
Undefined
will throw errors and exceptions
must be restricted to a Unix Machine only
will work perfectly well on a Windows Machine
will be displayed as a JavaScript text on the browser
var grade='E';
var result;
switch(grade)
{
case 'A':
result+=10;
case 'B':
result+= 9;
case 'C':
result+= 8;
default:
result+= 0;
}
document.write(result);
10
0
18
17
in
exist
within
exists
isarrayType()
==
===
typeof
var values=[1,2,3,4]
var ans=values.slice(1);
document.writeln(ans);
1, 2, 3, 4
2, 3, 4
1, 3, 4
error
string a = hi;
string b =there;
alert(a+b);
hi
there
hithere
undefined
When the function is defined as a looping statement
When the function is defined as expressions
When the function is predefined
when the function is called
int a=0;
for(a;a<5;a++);
console.log(a);
0
error
4
5
var pow=new Function(num1,num2,return Math.pow(num1,num2));
document.writeln(pow(2,3));
2
3
8
error
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
switch(expression)
{
statements
}
==
equals
equal
===
while (a != 0)
{
if (a == 1)
continue;
else
a++;
}
The continue keyword restarts the loop
The continue keyword skips the next iteration
The continue keyword skips the rest of the statements in that iteration
The continue keyword breaks out of the loop