Skip to content

Latest commit

 

History

History
34 lines (29 loc) · 1.23 KB

File metadata and controls

34 lines (29 loc) · 1.23 KB
title ms.date ms.prod ms.technology ms.topic f1_keywords dev_langs ms.assetid author ms.author manager
Function expected | Microsoft Docs
01/18/2017
visual-studio-windows
vs-javascript
error-reference
VS.WebClient.Help.SCRIPT5002
JavaScript
TypeScript
DHTML
f62ade94-9f6f-4832-9b9b-49a06a385bbe
mikejo5000
mikejo
ghogen

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.

See also

Function Object
prototype Property (Object)