首页 > Web开发 > 详细

js数据结构描述--列表

时间:2015-05-07 10:06:04      阅读:231      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!