Basic JavaScript Question:

Download Job Interview Questions and Answers PDF

How to create a function using function constructor?

JavaScript Interview Question
JavaScript Interview Question

Answer:

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");

Download JavaScript Interview Questions And Answers PDF

Previous QuestionNext Question
What does break and continue statements do in JavaScript? What's Prototypes for JavaScript?