Tell us what’s happening:
Hey I think there’s a bug in this assignment. The function “add” works fine but my remove function keeps getting the error : "indexOf is not defined (this gets printed 4 times) After going back an forth on this problem my function is nearly identical to the solution given in the Get a hint section:

I tried running the given solution and it runs without problems. Another thing I’m having trouble understanding is that the let variable gets declared twice in the Get a hint solution, which shouldn’t be allowed? : The console runs both functions add and remove with different parameters. In “add” a new let variable called newArr gets created. Rule of a let is that there can be only 1 let declared with the same name. So when the remove function gets run and also creates a let with the name newArr, shouldn’t the console print an error? Wouldn’t two lets in different functions also be problematic?

I passed the test by copying + pasting the solution, but ideally I would love to understand these problems for learning purpose ^_^;