PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, July 26, 2022

[FIXED] How to fix chrome/explorer crash when launching a For-loop?

 July 26, 2022     dreamweaver, for-loop, google-chrome     No comments   

Issue

Trying to make a loop that shows all the numbers in 3 times multiplication table, from 0 to 999. Every time I "launch" the .html with the script everything crashes.

<script>
for (var i = 0; i <=999; i+3 ) {
    console.log(i);
}
</script>

Chrome freezes, and after a few seconds, it says that the tab isn't responding and it just dies.

!!!!!!!!!!!!!!!! Found out about it. Missed a "=" between i+ and 3.


Solution

<script>
for (var i = 0; i <=999; i=i+3 ) {
    console.log(i);
}
</script>


Answered By - Nidhi Patel
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing