0
How to push latest value into object array
I have a array object like below [{'year:' 2008, 'occ': 1},{'year:' 2009,'occ:' 1},{'year :' 2008, 'occ:' 2}] Output [{'year:' 2009,'occ:' 1},{'year :' 2008, 'occ:' 2}]
2 Answers
0
Looking to pop off the first element?
0
The function "yourArrayName.shift();" will do this easily.