Correct syntax for variables

I’m trying to do something like this:



var t = 1;

onMouseDown = function () {

var "dot"+t = "some value";

t++;

}


whats the correct syntax for declaring a variable thats name changes according to a different variable.

Thanks