What are the benefits of initializing variables

Posted by Andre Scott | Updated on

It is recommended to initialize variables because of the below benefits,

  1. It gives cleaner code
  2. It provides a single place to initialize variables
  3. Avoid undefined values in the code

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