Anonymous | Login | Signup for a new account | 2024-03-29 09:44 CDT |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Dependency Graph | [ View Issue ] [ Relation Graph ] [ Vertical ] | |||
|
||||
|
Viewing Issue Simple Details | |||||
ID | Category | Type | Reproducibility | Date Submitted | Last Update |
0000125 | [In-Portal CMS] Optimization | bug report | always | 2009-07-19 07:39 | 2009-10-03 07:56 |
Reporter | alex | View Status | public | ||
Assigned To | alex | ||||
Priority | normal | Resolution | fixed | ||
Status | closed | ||||
Summary | 0000125: Javascript cycle "for (index in array)" is used for arrays - replace with normal "for (index = 0; i < array.length; i++)" | ||||
Description |
Currently in some places arrays are accessed as objects in cycles: var arr = ['one', 'two']; for (var elem in arr) { alert( arr[elem] ); } This approach works until someone adds new methods to Array class declaration. I propose to change such approach to normal "for" cycle: var arr = ['one', 'two']; for (var elem = 0; i < arr.length; elem++) { alert( arr[elem] ); } |
||||
Additional Information |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic In-Portal Open Source CMS |