Forum Discussion
HKosova
SmartBear Alumni (Retired)
It was just an example to illustrate the idea of dynamic array initialization. JavaScript/JScript arrays are dynamic by design, you can add and remove array elements at any time.
var arr = []; while (condition) { arr.push(element) } arr.pop(); // remove last element arr.splice(3, 1); // remove 1 element at index 3
Reference: JScript Array object
Colin_McCrae
8 years agoCommunity Hero
Yeah. I know.
But it did illustrate beautifully that you don't need to do it dynamically if you know the required size in advance ... :smileylol:
- yurik8 years agoContributor
Thank you everybody for the help!
Related Content
- 2 years agoTestQA1
Recent Discussions
- 60 minutes agomacheshmeh
- 17 hours agomarkos