How to create a function using function constructor? »
| 0 Comments |
The following example illustrates this
It creates a function called square with argument x and returns x multiplied by itself.
var square = new Function (”x”,”return x*x”);
Java Interview Questions | IT interview questions | Software Testing Interview questions | .Net Interview Questions | Job Interview Questions & Answers | Tough Interview Questions | Technology Interview Questions | Tech Interview Questions | Testing Interview Questions | SAP Interview Questions | ABAP Interview Questions | Data Warehousing Interview Questions
Category: Javascript Interview Questions| 0 Comments |
The following example illustrates this
It creates a function called square with argument x and returns x multiplied by itself.
var square = new Function (”x”,”return x*x”);
| 0 Comments |
Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop.
| 0 Comments |
The delete operator is used to delete all the variables and objects used in the program ,but it does not delete variables declared with var keyword.
| 0 Comments |
==== is strict equality operator ,it returns true only when the two operands are having the same value without any type conversion.
| 0 Comments |
Undeclared variables are those that are not declared in the program (do not exist at all),trying to read their values gives runtime error.But if undeclared variables are assigned then implicit declaration is done .
Undefined variables are those that are not assigned any value but are declared in the program.Trying to read such variables gives special [...]
| 0 Comments |
No.Javascript does not have block level scope,all the variables declared inside a function possess the same level of scope unlike c,c++,java.
| 0 Comments |
It is perfectly legal to assign a number to a variable and then assign a string to the same variable as follows
example
i = 10;
i = “string”;
This is called variable typing
| 0 Comments |
(i)Undefined value cannot be explicitly stated that is there is no keyword called undefined whereas null value has keyword called null
(ii)typeof undefined variable or property returns undefined whereas typeof null value returns object