crop_rotate
Run
<!DOCTYPE html> <html> <body> <p>Click the button to check if the ul element with id="myList" is the same as the document's first ul element. If so, add a color to its first child.</p> <button onclick="myFunction()">Try it</button> <ul id="myList"><li>Coffee</li><li>Tea</li></ul> <script> function myFunction() { var item1 = document.getElementById("myList"); var item2 = document.getElementsByTagName("UL")[0]; if (item1 === item2) { alert("THEY ARE THE SAME!!"); } else { alert("They are not the same."); } } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxib2R5Pg0KDQo8cD5DbGljayB0aGUgYnV0dG9uIHRvIGNoZWNrIGlmIHRoZSB1bCBlbGVtZW50IHdpdGggaWQ9Im15TGlzdCIgaXMgdGhlIHNhbWUgYXMgdGhlIGRvY3VtZW50J3MgZmlyc3QgdWwgZWxlbWVudC4gSWYgc28sIGFkZCBhIGNvbG9yIHRvIGl0cyBmaXJzdCBjaGlsZC48L3A+DQoNCjxidXR0b24gb25jbGljaz0ibXlGdW5jdGlvbigpIj5UcnkgaXQ8L2J1dHRvbj4NCg0KPHVsIGlkPSJteUxpc3QiPjxsaT5Db2ZmZWU8L2xpPjxsaT5UZWE8L2xpPjwvdWw+DQoNCjxzY3JpcHQ+DQpmdW5jdGlvbiBteUZ1bmN0aW9uKCkgew0KICB2YXIgaXRlbTEgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgibXlMaXN0Iik7DQogIHZhciBpdGVtMiA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJVTCIpWzBdOw0KICANCiAgaWYgKGl0ZW0xID09PSBpdGVtMikgeyANCiAgICBhbGVydCgiVEhFWSBBUkUgVEhFIFNBTUUhISIpOw0KICB9IGVsc2Ugew0KICAgIGFsZXJ0KCJUaGV5IGFyZSBub3QgdGhlIHNhbWUuIik7DQogIH0NCn0NCjwvc2NyaXB0Pg0KDQo8L2JvZHk+DQo8L2h0bWw+