Open
Description
While making a new arrow macro, I wanted to use 'length' as param name for the length of the desired arrow:
http://andreasplesch.github.io/x3dv4/test/Macro.html
However, this did not work, and I need to work around with the name 'lengthness'. The reason is that length is a reserved word for array indices, see below.
There is an easy solution. Just make params an object instead of an array, in line 267:
var params = {} ;
I did not test but this may be the only change necessary.
-- arrays vs. objects
aa = [1, 2];
Array [ 1, 2 ]
aa.length
2
aa['length']
2
bb = {};
Object { }
bb['i1']=12
12
bb['i2']=13
13
bb['length']
undefined
Metadata
Assignees
Labels
No labels