<html>
<head><title>Frontpage</title></head>
<h3>Hello</h3>
<script>
var a=1;
function myFunc(){
document.write(a+" ");
a=a+1;
myFunc();
}
</script>
<body><button type="button" onclick="myFunc()">Hey there</button></body>
</html> Run Code Online (Sandbox Code Playgroud)
Internet Explorer中的输出为0到53075,而Chrome中的输出为12561.我不明白为什么不同的浏览器显示不同的输出以及它如何停止递归.谢谢.
struct Node *prevX = NULL, *currX = *head_ref;
while (currX && currX->data != x)
{
prevX = currX;
currX = currX->next;
}
Run Code Online (Sandbox Code Playgroud)
为什么currX放在这里?它如何影响结果?