• + 0 comments

    In JS

    function getCount(objects) {
        let count =0
        for(const obj of objects){
            if(obj.x===obj.y){
                count++;
            }
        }
        return count;
    }