+ 4
don't know how array works???
var touch = [ x =3 , y = 2 , r = "0" , ]; console.log(touch.x+" ,"+ touch.y +" ,"+touch.r); /* in above code, it is saying "undefined". i dont know why.. plz.. Say if you know it.. also tell how to access the value of x, y, and r.. */
1 ответ
+ 2
use numeral index, ex. touch[0]
to create what you trying to make. initialized it as an object
var touch={
x:3,
y:2,
r:"0"
}