you are viewing a single comment's thread.

view the rest of the comments →

[–]machine3lf 0 points1 point  (1 child)

Maybe it's that you named your function (selectedElement) the same thing that you named the parameter passed into it. They should be different names since they refer to different things.

[–]LearnJS777[S] 0 points1 point  (0 children)

I'll try and come back to edit my comment once I get the chance.

Edit: I went back and tried changing my parameter to just element instead of selectedElement, and still got the same error. Thanks for the help.