Merhabalar,

Bir proje içinde gördüğüm JavaScript kodu dikkatimi çekti. JavaScript biliyorum fakat bu kadar hakim değilim. Sizce nedir bu kod? Ne iş yapıyor?

    function showRestaurantData(url) {
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function() {
            if (this.readyState == 4 && this.status == 200) {
                document.getElementById("restaurant_list").innerHTML = this.responseText;
            }
        };
        xhttp.open("GET", url, true);
        xhttp.send();

    }//endFunction