javascript棧的建立樣碼

早上參加小孩的一年級入學前,看看相關的東東啦。。 function Stack() { var items = []; this.push = function(element){ items.push(element); } this.pop = function(){ return items.pop(); }
相關文章
相關標籤/搜索