Common Mistakes To Avoid

Understand the common mistakes and errors in order to avoid them.

❌ Common errors

Some common errors are:

  • Starting from the 11st index instead of the 00th index when iterating over an array
  • Using i <= array.length, instead of i < array.length, when iterating over an array
  • Declaring an array in an incorrect format
  • Accessing an index that exceeds the bounds of the array

🚨 An important alert

Look at the code below.

Get hands-on with 1200+ tech skills courses.