Skip to content
Advertisement

Why the specific index position not working with the .remove? [closed]

I’m trying to do the Gradebook python project. For some reason I’m getting value error with specific index. Other index within the array I tried is working fine except for the specific index. Can anyone tell what’s wrong with the code :

JavaScript

Other index position works except for 2nd index. Thank you in advance.

Advertisement

Answer

After reformatting your code, it becomes somewhat obvious that you’re doing something different with the second index:

JavaScript

Presumably it should be:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement