Negative numbers, arrays javascript!
Posted
by zizzamia
on Stack Overflow
See other posts from Stack Overflow
or by zizzamia
Published on 2010-05-19T19:38:24Z
Indexed on
2010/05/19
19:40 UTC
Read the original article
Hit count: 287
I was implementing a routing algorithm in javascript, but when I assign a negative one variable in the array gives me this error: invalid array length.
var node = new Array()
node[0] = new Array(6,7)
node[1] = new Array(5,-4,8)
node[2] = new Array(-2) //Here, invalid array length
I do not know how to resolve this error.
© Stack Overflow or respective owner