Primary expression
Functional expression
Invocation expression
Property Access Expression
C. Invocation expression
if(a!=null)
if (!a)
if(a!null)
if(a!==null)
const obj1 =
{
property1: 21
}
const descriptor1 = Object.getOwnPropertyDescriptor(obj1, 'property1');
console.log(descriptor1.configurable);
console.log(descriptor1.enumerable);
true 21
true false
true true
false false
var arr = [7, 5, 9, 1];
var value = Math.max.apply(null, arr);
document.writeln(value);
7
5
1
9
debugger
with
if
use strict
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
RMI
Triggering Event
Preprocessor
Function/Method
continue statement
break statement
goto statement
return statement
Keywords
Declaration statements
Data types
Prototypes
RMI
Triggering Event
Preprocessor
Function/Method
The property will be stored in a cache
The loop will not run
That property will not be enumerated
The property will be enumerated
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
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
var grade='B';
var result;
switch(grade)
{
case 'A':
{
result+=10;
break;
}
case 'B':
{
result+= 9;
break;
}
case 'C':
{
result+= 8;
break;
}
default:
result+= 0;
}
document.write(result);
10
9
8
0
function concatenate()
{
return String.prototype.concat('', arguments);
}
function concatenate()
{
return String.prototype.apply('', arguments);
}
function concatenate()
{
return String.concat.apply('', arguments);
}
function concatenate()
{
return String.prototype.concat.apply('', arguments);
}
decrements the total length by 1
increments the total length by 1
prints the first element but no effect on the length
updates the element
Floating numbers
Representation of functions that returns a value
is not present in JavaScript
Form feed
var a= 0;
var b = 0;
while (a < 3)
{
a++;
b += a;
console.log(b);
}
135
123
013
01
Primary expression
Functional expression
Invocation expression
Property Access Expression
prototype stack
prototype chain
prototype class
prototypes
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
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
var values=[one,two,Three];
var ans=values.shift();
document.writeln(ans);
one
two
three
error
7.25
-7.25
7
-7
switch(expression)
{
statements
}
==
equals
equal
===
Int a=1;
if(a>10)
{
document.write(10);
}
else
{
document.write(a);
}
10
0
1
Undefined
if (!a[i]) continue;
Skips the defined elements
Skips the existent elements
Skips the null elements
Skips the defined & existent elements
isPrototypeOf() method
equals() method
=== operator
==opertor
var grand_Total=eval(10*10+5);
10*10+5
105 as a string
105 as an integer value
Exception is thrown
Volatile variable
Mutable variable
Immutable variable
Dynamic variable
var arr = [7, 5, 9, 1];
var min = Math.min.apply(null, arr);
document.writeln(min);
7
5
1
9