javascript - How do I get the triangle array outside so that I can use it -
i storing id's array. array correctly populated, not able log outside nor use it. confused. here code,
javascript
function storetriangle() { var triangle = []; return function storepolygons() { (var = 0; < 31; i++) { triangle[i] = s.select("#triangle36_" + (224 - i) + "_"); } }; storepolygons(); }; var polygons = storetriangle(); polygons();
function storetriangle() { var triangle = []; return function() { (var = 0; < 31; i++) { triangle[i] = s.select("#triangle36_" + (224 - i) + "_"); } return triangle; }; }; var polygons = storetriangle(); var triangle=polygons(); console.info(triangle)
Comments
Post a Comment