crop_rotate
Run
<!DOCTYPE html> <html> <body> <!-- Note that the <li> elements inside <ul> are not indented (whitespaces). If they were, the first child node of <ul> would be a text node --> <ul id="myList"><li>Coffee</li><li>Tea</li></ul> <p>Click the button to see if the ul element has any child nodes. If so, remove its first child node (index 0).</p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { var list = document.getElementById("myList"); if (list.hasChildNodes()) { list.removeChild(list.childNodes[0]); } } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxib2R5Pg0KDQo8IS0tIE5vdGUgdGhhdCB0aGUgPGxpPiBlbGVtZW50cyBpbnNpZGUgPHVsPiBhcmUgbm90IGluZGVudGVkICh3aGl0ZXNwYWNlcykuIA0KSWYgdGhleSB3ZXJlLCB0aGUgZmlyc3QgY2hpbGQgbm9kZSBvZiA8dWw+IHdvdWxkIGJlIGEgdGV4dCBub2RlIA0KLS0+DQo8dWwgaWQ9Im15TGlzdCI+PGxpPkNvZmZlZTwvbGk+PGxpPlRlYTwvbGk+PC91bD4NCg0KPHA+Q2xpY2sgdGhlIGJ1dHRvbiB0byBzZWUgaWYgdGhlIHVsIGVsZW1lbnQgaGFzIGFueSBjaGlsZCBub2Rlcy4gSWYgc28sIHJlbW92ZSBpdHMgZmlyc3QgY2hpbGQgbm9kZSAoaW5kZXggMCkuPC9wPg0KDQo8YnV0dG9uIG9uY2xpY2s9Im15RnVuY3Rpb24oKSI+VHJ5IGl0PC9idXR0b24+DQoNCjxzY3JpcHQ+DQpmdW5jdGlvbiBteUZ1bmN0aW9uKCkgew0KICB2YXIgbGlzdCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJteUxpc3QiKTsNCiAgDQogIGlmIChsaXN0Lmhhc0NoaWxkTm9kZXMoKSkgew0KICAgIGxpc3QucmVtb3ZlQ2hpbGQobGlzdC5jaGlsZE5vZGVzWzBdKTsNCiAgfQ0KfQ0KPC9zY3JpcHQ+DQoNCjwvYm9keT4NCjwvaHRtbD4=