I'm mapping some points as dots onto a canvas, and I want dots which are repeats to be rendered as larger dots.
I need to check to see if the coordinate has already been mapped before, so I want to store the coordinates in an array as I go.
Here's what I have. I'm unsure about the .inArray line. How do I check to see if the coordinate is already in the array?
$(function() {
var arr = [];
arr.push([0,1]);
arr.push([2,1]);
arr.push([3,1]);
arr.push([4,1]);
arr.push([5,1]);
if(jQuery.inArray("2,1",arr)) {
alert("not there");
}
});