闭包传参
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script>
function aa(x){
var num = 10;
return function(y){
console.log(num + x + y);
}
}
var cc = aa(15);
cc(25);
var dd = aa(10)
dd(13);
dd(23);
function a(){
return function(str){
console.log(str.name);
}
}
var b = a();
//b('屌丝);
b({name:'andy',age:50});
</script>
</body>
</html>
重来没有接触过,零基础学习软件编程,一个字累