this is the code
var xyzTris = [[[0,-3,4],[-2,0,4],[2,0,4]]];
console.log("zero: ",rdfTris);
var scrTris = [[[]]];
console.log("first: ",scrTris);
var rdfTris = [[[]]];
console.log("second: ",rdfTris);
What's strange is, the console out shows:
zero: undefined
first: Array [[[]]]
second: Array [[[0, -3, 4]]]
Anybody get why the rdfTris array is mal-defined?
I've tried all sorts of rearrangements, the parser just seems confused by rdfTris and xyzTris. I discovered this downstream when I was getting some weird array elements not defined later in the code. Stripped all that away to get to this.
rdfTrisbefore assigning a value to it. Note, that only declarations are hoisted, not assignments.Trismeaningful, (xyz,scr,rdf)? Consider using longer more descriptive names to prevent confusions like thisletkeyword, instead ofvar.