1.为什么外部这个J没有赋值成功,而是返回了nan?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript">
var j;
function indexx(index) {
if(index == 1) {
return 1;
}
j= index * indexx(index - 1);
}
indexx(4);
console.log(j);
</script>
</body>
</html>
梦里花落0921
沧海一幻觉
相关分类