JavaScript JavaScript and the DOM Traversing the DOM Getting the First and Last Child

Nour El-din El-helw
Nour El-din El-helw
8,228 Points

[SOLVED]Need someone to review my code

I think I'm nearly done with the extra feature in the webpage but, there is a bug I can't figure out. So here is my code, can someone review the code and tell me what's wrong? https://w.trhou.se/sqe0op63nx .

Jonathan Fernandes
Jonathan Fernandes
Pro Student 22,741 Points

I can take a look at it, but before I do, do you mind describing the bug you are experiencing and steps to reproduce it?

Michael Hulet
Michael Hulet
Treehouse Moderator 46,564 Points

I agree with Jonathan on this. A code evaluation is easy, but it'd be really helpful to have a description of the bug ahead of time so we know what to look for

Nour El-din El-helw
Nour El-din El-helw
8,228 Points

Yeah, sure. The bug is when i click the button 'down' on the third element ( which is the one before the last ) the last one takes its place as expected but the 'down' button of the last element which is now the third disappears after it. Sorry I didn't say that at the beginning.

Nour El-din El-helw
Nour El-din El-helw
8,228 Points

Nevermind guys, fixed the bug. Thanks for your time :)

1 Answer