Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6f9bcd3

Browse files
barcaheadcaitp
authored andcommitted
docs($rootScope): use unshift to add items to the array at the beginning
Closes angular#7364
1 parent e16e7df commit 6f9bcd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/rootScope.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* Loop operations are optimized by using while(count--) { ... }
1717
* - this means that in order to keep the same order of execution as addition we have to add
18-
* items to the array at the beginning (shift) instead of at the end (push)
18+
* items to the array at the beginning (unshift) instead of at the end (push)
1919
*
2020
* Child scopes are created and removed often
2121
* - Using an array would be slow since inserts in middle are expensive so we use linked list

0 commit comments

Comments
 (0)