javascript - Pushing Array value to first Index - Stack …
https://stackoverflow.com/questions/6358130/pushing-array-value-to-first-index
Nov 06, 2012 · Based on what you've said, it would make more sense to always reverse the array, then push your value: //initial array: ['apple','mangi','lemon'] Config.Windows.reverse (); // ['lemon','mangi','apple'] if (condition) { //this will get the same result as your code Config.Windows.push ("banana"); // ['lemon','mangi','apple', 'banana'] } Reviews: 3
Reviews: 3
DA: 6 PA: 59 MOZ Rank: 68