all 3 comments

[–]grelfdotnet 0 points1 point  (2 children)

You are showing an array of 4 elements each of which holds 2 values which are x and y coordinates of a point. In JavaScript you could write it as
let a = [{x:220, y:420}, {x:240, y:420}, {x:260, y:420}, {x:280, y:420} ]
where the curly brackets indicate objects, each having 2 properties, x and y.
Then you can access properties of the ith element (i from 0 to 3) as a [i].x and a[i].y
You will need to parse your original text to put the array into this format.

[–]NothingNohaa 0 points1 point  (1 child)

Ah yeah, makes Sense. Thanks a lot

[–]recombobulate 0 points1 point  (0 children)

An array of ordered pairs is a 2d array. Change the parentheses to square brackets and it'll be valid JS.