storing coordinates in array in javascript

前端 未结 4 2014
别那么骄傲
别那么骄傲 2021-02-04 07:37

I want to store coordinates into an array in javascript, I am new to javascript and do not have an idea how to do it.

Any help would be appreciated.

4条回答
  •  难免孤独
    2021-02-04 07:48

    These answers are not usable if you're trying to store a grid/matrix that you wanted to access data point by x,y values later.

    var coords = [];
    
    for(y=0; y < rows; y++){
       for(x=0;x

提交回复
热议问题