How can we check whether a function exists in javascript?

Platform: ASP.NET|Category: Client Side Scripting

We can check the existence of a function by Window.FunctionName as shown below, where the FunctionName is the name of the function,whose existence has to be checked.

<SCRIPT LANGUAGE='JavaScript' type='text/javascript'>
functionCheckIfExists()
{
	alert(’FunctionExists’)
}
if( window.CheckIfExists)
{
 	CheckIfExists()
}
else
{
 	alert( Function Not Exists!’ )
}
</SCRIPT>