js数据结构描述--列表

<script type="text/javascript">
	/**
	 * 数据结构--列表
	 * 【什么是列表】
	 * 【列表的使用场景】
	 */
	function list(){
		this.dataStore = [];
		this.length = 0;
		this.postion = 0;
		this.append = append;
		this.contains = contains;
		this.push = push;
		this.pop = pop;
		this.remove = remove;
		this.clear = clear;
	}
	
	
	//给列表添加元素
	function append(element){
		this.dataStore[this.length] = element;
	}
	
	//从列表中删除元素
	function remove(element){
	
	}
	
	
	
	
	
	
</script>

 

posted @ 2015-05-07 08:37  liwuming  阅读(159)  评论(0编辑  收藏  举报