What are the pros and cons of for loop

Posted by Andre Scott | Updated on

The for-loop is a commonly used iteration syntax in javascript. It has both pros and cons ####Pros

  1. Works on every environment
  2. You can use break and continue flow control statements

Cons:

  1. Too verbose
  2. Imperative
  3. You might face one-by-off errors

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers