Why do we add "Index"?

Hi, I’m just curious as to why we add “index” to the variable in for loops. What is the point of this? Why can we just use the normal variable name? Thanks!


Replace this line with your code. 

It’s not compulsory.you can take any name for your iterator variable then use the same name to that variable to print the values.
for example:
if i use x as iterator variable then i have to write



@digitalace66173 while the names can get really long its really there for specificity and readability, I think this naming convention works well for teaching also it reminds me of naming convention for css which can help you write class names that is quickly understood by other developers

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.