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
A. Before each iteration, the interpreter evaluates the variable expression and assigns the name of the property
var person =
{
name: Rahul,
getName: function()
{
nreturn this.name;
}
}
var unboundName = person.getName;
var boundName = unboundName.bind(person);
document.writeln(boundName());
runtime error;
compilation error
Rahul
undefined
var txt1 = good;
var txt2 = day;
document.getElementById(demo).innerHTML = txt1 + txt2;
good day
goodday
error
undefined
[digits][.digits][(E|e)[(+|-)]digits]
[digits][+digits][(E|e)[(+|-)]digits]
[digits][(E|e)[(+|-)]digits]
[.digits][digits][(E|e)[(+|-)]digits]
if (!a[i]) continue;
Skips the defined elements
Skips the existent elements
Skips the null elements
Skips the defined & existent elements
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
Controlled loop constructs
Case checking constructs
Validation constructs
All of the mentioned
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 string2Num=parseInt(123xyz);
123
123xyz
Exception
NaN
function f() {};
Function f
A custom constructor
Prototype of a function
Not valid
var obj=
{
length:20,
height:35,
}
if (breadth' in obj === false)
{
obj.breadth = 12;
}
console.log(obj.breadth);
20
12
undefined
error
function equalto()
{
int num=10;
if(num===10)
return true;
else
return false;
}
true
false
runtime error
compilation error
7.25
-7.25
7
-7
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);
}
isPrototypeOf() method
equals() method
=== operator
==opertor
parse
a sync
defer
type
Object-Oriented
High-level
Assembly-language
Object-Based
function compare()
{
int num=2;
char b=2;
if(a==b)
return true;
else
return false;
}
true
false
runtime error
compilation error
Updation, Incrementation, Initialization
Initialization,Testing, Updation
Testing, Updation, Testing
Initialization,Testing, Incrementation
Returns the value and continues executing rest of the statements, if any
Returns the value and stops the program
Returns the value and stops executing the function
Stops executing the function and returns the value
An integer
A String
An object
Floating point
int a=4;
int b=1;
int c=0;
If(a==b)
document.write(a);
else if(a==c)
document.write(a);
else
document.write(c);
4
1
Error
0
var arr = [7, 5, 9, 1];
var min = Math.min.apply(null, arr);
document.writeln(min);
7
5
1
9
Alternative to if-else
Immediate if
If-then-else statement
Switch statement
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
<script>
var x = 5;
var y = 2;
var z = x % y;
document.getElementById("demo").innerHTML = z;
</script>
0
1
2
5
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
RMI
Triggering Event
Preprocessor
Function/Method
Procedures
Method
Static function
Dynamic function
o(x,y);
o.m(x) && o.m(y);
m(x,y);
o.m(x,y);
prototype stack
prototype chain
prototype class
prototypes