javascript - What is this: js? -


i came across code , wondering it? array?

test = {a: [1,0,0], b:[0,1,0], c:[0,0,1]};   

how array for instance?

console.log(bases[a]); 

^ results in "uncaught referenceerror: not defined"

the output of console.log(test);

object {a: array[3], b: array[3], c: array[3]} 

the output

object {a: array[3], b: array[3], c: array[3]} 

shows that:

  • test -> object
  • a, b , c -> arrays

to access a/b or c, use:

console.log(test.a) 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -