In Javascript, I want to check if an attribut (or object) is a function or not.
My Present code:
if (this.execute != null)
{
this.execute();
}
Error: Object doesn't support this property or method.
i want to do something like
if (this.execute != null and isExecutableFunction(this.execute)== true )
{
this.execute();
}
Is there anyway in Javascript to check if an attribute (or object ) is a function or not
Any help shall be appreciated.
Thanks.