码迷,mamicode.com
首页 > Web开发 > 详细

js数据结构描述--列表

时间:2015-05-07 10:06:49      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:

<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>

 

js数据结构描述--列表

标签:

原文地址:http://www.cnblogs.com/liwuming/p/4483808.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!