{"ScriptPreparationCode":"function getClosestParent(elem, until, selector) {\r\n for (; elem \u0026\u0026 elem !== until; elem = elem.parentNode) {\r\n if (elem.matches(selector)) return elem;\r\n }\r\n return null;\r\n}\r\n\r\nvar inner = document.querySelector(\u0022.inner\u0022);\r\nvar index = document.getElementById(\u0027index\u0027);\r\nvar arr1 = [];\r\nvar arr2 = [];\r\nvar outer1, outer2, i, j;","TestCases":[{"Name":"Native","Code":"for(i=0;i\u003C10;i\u002B\u002B) {\r\n\touter1 = inner.closest(\u0022.outer\u0022);\r\n arr1.push(outer1);\r\n}","IsDeferred":false},{"Name":"function","Code":"for(j=0;j\u003C10;j\u002B\u002B) {\r\n\touter2 = getClosestParent(inner, index, \u0022.outer\u0022);\r\n arr2.push(outer2);\r\n}","IsDeferred":false}]}