function f() {};
Function f
A custom constructor
Prototype of a function
Not valid
B. A custom constructor
Procedures
Method
Static function
Dynamic function
Prints an exception error
Prints an overflow error
Displays Infinity
Prints the value as such
var count = 0;
while (count < 10)
{
console.log(count);
count++;
}
The values of count are logged or stored in a particular location or storage
The value of count from 0 to 9 is displayed in the console
An error is displayed
An exception is thrown
Syntax error
Missing of semicolons
Division by zero
Missing of Bracket
if (!a[i]) continue;
Skips the defined elements
Skips the existent elements
Skips the null elements
Skips the defined & existent elements
Alternative to if-else
Immediate if
If-then-else statement
Switch statement
in
exist
within
exists
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
Floating numbers
Representation of functions that returns a value
is not present in JavaScript
Form feed
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
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
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
Before each iteration, the interpreter evaluates the variable expression and assigns the name of the property
The iterations can be infinite when an interpreter is used
The body of the loop is executed only once
the iteration is finite when an interpreter is used
if(a!=null)
if (!a)
if(a!null)
if(a!==null)
var count = 0;
while (count < 10)
{
console.log(count);
count++;
}
The values of count are logged or stored in a particular location or storage
The value of count from 0 to 9 is displayed in the console
An error is displayed
An exception is thrown
const obj1 = { property1: '10'};
const obj2 = Object.freeze(obj1);
obj2.property1 = '20';
console.log(obj2.property1);
10
20
Runtime error
Compilation error
1.01
1.047
1.00
1.4
conditional block
block that contains a single statement
both conditional block and a single statement
block that combines multiple statements into a single compound statement
The property will be stored in a cache
The loop will not run
That property will not be enumerated
The property will be enumerated
An integer
A String
An object
Floating point
stand-alone expressions
basic expressions containing all necessary functions
contains variable references alone
contains only keywords
filter and fold
inject and fold
finger and fold
fold
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
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
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
RMI
Triggering Event
Preprocessor
Function/Method
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
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
int a=0;
for(a;a<5;a++);
console.log(a);
0
error
4
5