previousSilbing()과 previousElementSibling()의 차이
https://www.w3schools.com/jsref/prop_node_previoussibling.asp
HTML DOM previousSibling Property
HTML DOM previousSibling Property Element Object Example Get the HTML content of the previous sibling of a list item: var x = document.getElementById("item2").previousSibling.innerHTML; The result of x will be: Coffee (first li) --> Try it Yourself » Defin
www.w3schools.com
https://www.w3schools.com/jsref/prop_element_previouselementsibling.asp
HTML DOM previousElementSibling Property
HTML DOM previousElementSibling Property Element Object Example Get the HTML content of the previous sibling of a list item: var x = document.getElementById("item2").previousElementSibling.innerHTML; The result of x will be: Coffee (first li) --> Try it Yo
www.w3schools.com


previousSibling() > Element는 물론 #text와 주석까지 node로 카운트하여 반환
previousElementSibling() > Element만 카운트하여 반환
previousSibling / previousElementSibling
nextSibling / nextElementSibling
parentNode / parentElement
childNodes / children