js中的匿名函数

<html>
<head>
<script type="text/javascript">
    function a(){
	
	}
	// 匿名函数
	var f= function(x){
	     alert(x);
	}
	f(1);
</script>
</head>
<body>
   
</body>  
</html>

该函数f=function(){};

这段代码f表示给匿名函数相当对命名。

可以直接调用f();

原文地址:https://www.cnblogs.com/lonecloud/p/5487983.html