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
Post a Comment