Joins, Drill 4

Write the function removeEvenCircles that will take a selection of elements, remove the elements whose value fields are even, and return a selection with those elements. As before, each circle is bound to an object with the shape {key: ..., value: ...}.

  <svg id="svg">
    var elements = d3.selectAll("#svg")
        .data([{ key: "4", value: 6},
               { key: "3", value: 12},
               { key: "2", value: 5},
               { key: "1", value: 10}],
              function(d) { return d.key; })
    removeEvenCircles(elements); // write this function

Try it

HTML Output