1 2 3 4 5 6 7 8 9
<!doctype html> <div id=x>Fail</div> <script src=asserts.js></script> <script> assert(!![].at); assert_equals([1, 2, 3].at(-2), 2); assert_equals([1, 2, 3].at(-4), undefined); document.getElementById("x").textContent = "Success"; </script>