/*
* 函数的返回值可以返回,number,string,boolean,null,undefined,object;
* 当函数的没有返回值的时候,他其实是返回undefined!!也就是h();
*/
<script type="text/javascript"> var a = function(){ return 1; } var b = function(){ return "a"; } var c = function(){ return true; } var d = function(){ return null; }
var f = function(){
return undefined;
} var g = function(){ return {}; } var h = function(){
return;
}
</script>
![](https://img2024.cnblogs.com/blog/35695/202408/35695-20240826070647288-243310440.jpg)