I am writing code and I came up to issue where I need to select something other than firstChild
, but I don't know the syntax to write this code. I scoured online hoping to find some API documentation on them but have found nothing. What is the code to select other child elements? Like say I wanted to select the 4th child in a element, what is the code for that? I only know the code to select the 1st child element.
dom.el("playeravatar").firstChild.innerHTML = '<img src="dwarfs/dwarf14.jpg" style="max-width: 200px; max-height: auto" alt="Dwarf">';