小编Deb*_*ba 的帖子

为什么不同的网络浏览器会为这段代码显示不同的输出?

 <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.我不明白为什么不同的浏览器显示不同的输出以及它如何停止递归.谢谢.

javascript

5
推荐指数
1
解决办法
66
查看次数

为什么在条件语句中放置任何标识符而不给出任何条件

  struct Node *prevX = NULL, *currX = *head_ref; 
  while (currX && currX->data != x) 
 { 
   prevX = currX; 
   currX = currX->next; 
 } 
Run Code Online (Sandbox Code Playgroud)

为什么currX放在这里?它如何影响结果?

c

1
推荐指数
1
解决办法
53
查看次数

标签 统计

c ×1

javascript ×1