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

Getting the first and last child

Can anyone help me to solve this problem and post the best solution of this problem with statements.
I want to know the logic. What logic should I apply to do this. I tried too much , given number of hours to solve this problem but still unsolved. So I finally reached here to ask the best solution to this problem. Just this last problem-"How to make the up button disappear for first li item and down button disappear for last li item".
Help will be appreciated .
Thanks

1 Answer

Seems like you have not followed the course?