Are variables declared and assigned in an \"if\" statement visible only within that \"if\" block or within the whole function?
Am I doing this right in the followin
are variables declared and assigned in an "if" statement visible only within that "if" block or within the whole function?
In Javascript, all variables are either
am i doing this right in the following code? (seems to work, but declaring "var structure" multiple times seems akward) any cleaner solutions?
Yes. A cleaner solution might be to build a base class of structure, and modify what is different in each case.