PDA

View Full Version : [KitchenSink example] What does unshift stands for ?



laurent64
27 Sep 2010, 11:58 PM
Hello everybody :)

Here a piece of KitchenSink demo code - index.js - which upset me



if (!Ext.is.Phone && Ext.orientation == 'landscape') {
this.dockedItems.unshift(this.navigationPanel);
}
else if (Ext.is.Phone) {
this.items = this.items || [];
this.items.unshift(this.navigationPanel);
})


More precisely, these two lines



...
this.dockedItems.unshift(this.navigationPanel);
...
this.items.unshift(this.navigationPanel);
...


So, what does unshift stands for ? I didn't find it in Ext Js API nor Sencha one nor Sencha Forum.

Thanks for helps and readings :)

evant
27 Sep 2010, 11:59 PM
http://www.w3schools.com/jsref/jsref_unshift.asp

laurent64
28 Sep 2010, 12:10 AM
Thank you very much :)

I've forgottent this was part of Javascript Language

Apologizes for such a simple question. Next time i search also in Javascript docs.
Thanks :)