isarrayType()
==
===
typeof
D. typeof
switch(expression)
{
statements
}
==
equals
equal
===
Syntax error
Missing of semicolons
Division by zero
Missing of Bracket
var values=[one,two,Three];
var ans=values.shift();
document.writeln(ans);
one
two
three
error
function compare()
{
int num=2;
char b=2;
if(a==b)
return true;
else
return false;
}
true
false
runtime error
compilation error
function equalto()
{
int num=10;
if(num===10)
return true;
else
return false;
}
true
false
runtime error
compilation error
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
function compare()
{
int a=1;
char b=1;
if(a.tostring()===b)
return true;
else
return false;
}
true
false
runtime error
logical error
var tensquared = (function(x) {return x*x;}(10));
Yes, perfectly
Error
Exception will be thrown
Memory leak
in
exist
within
exists
Properties
Prototypes
Lvalue
Definition
var arr=[1,2,3];
var rev=arr.reverse();
document.writeln(rev);
1, 2, 3
3, 2, 1
3
1
stand-alone expressions
basic expressions containing all necessary functions
contains variable references alone
contains only keywords
parse
a sync
defer
type
If the object inherits enumerable properties
The object does not have the properties present in the integer array indices
The delete keyword is never used
Object.defineProperty() is not used
function f(o)
{
if (o === undefined) debugger;
}
It does nothing but a simple breakpoint
It debugs the error in that statement and restarts the statements execution
It is used as a keyword that debugs the entire program at once
It is used to find error in the statement
maps the elements of another array into itself
passes each element of the array and returns the necessary mapped elements
passes each element of the array on which it is invoked to the function you specify, and returns an array containing the values returned by that function
pass the elements of the array into another array
Int a=1;
if(a>10)
{
document.write(10);
}
else
{
document.write(a);
}
10
0
1
Undefined
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
It is mandatory
Not necessary
Few functions return values by default
some functions do not return any value
The property will be stored in a cache
The loop will not run
That property will not be enumerated
The property will be enumerated
The interpreter stops its work
The interpreter throws another exception
The interpreter jumps to the nearest enclosing exception handler
The interpreter throws an error
int a==2;
int b=4;
int ans=a+b;
print(ans);
2
6
0
error
Procedures
Method
Static function
Dynamic function
Class, parameters, objects extensible flag
Prototype, class, objects parameters
Prototype, class, objects extensible flag
Native object, Classes and Interfaces and Objects extensible flag
function info()
{
int a=1;
int b=2;
return a*b;
}
document.write(info());
1
2
3
error
var grand_Total=eval(10*10+5);
10*10+5
105 as a string
105 as an integer value
Exception is thrown
o.m(x) && o.m(y);
o[m](x,y);
o(m)[x,y];
o.m(x && y);
var val1=[1,2,3];
var val2=[6,7,8];
var result=val1.concat(val2);
document.writeln(result);
1, 2, 3
Error
1, 2, 3, 6, 7, 8
123
<script>
document.getElementById("demo").innerHTML = typeof "John"
</script>
integer
number
string
error
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