Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

Function expected

Either you attempted to invoke one of the Function prototype methods on an object that was not a Function object, or you used an object in a function call context. For example, the following code produces this error because example is not a function.

var example = new Object();  // Create a new object called "example".
var x = example();           // Try and call example as if it were a function.

To correct this error

  • Only call Function prototype methods on Function objects.

  • Ensure that you use the function call operator () to call functions only.

Show:
© 2015 Microsoft