<script type="text/javascript">
/**
* 自定义Map对象
*/
function Map(){
this.keys = new Array();
this.data = new Array();
this.put = function(key,value){
if(this.data[key] == null){
this.keys.push(value);
}
this.data[key] = value;
};
this.get = function(key){
return this.data[key];
};
this.remove = function(key){
this.keys.remove(key);
this.data[key] = null;
};
this.isEmpty = function(){
return this.keys.length == 0;
};
this.size = function(){
return this.keys.length;
};
}
</script>
js自定义Map
最新推荐文章于 2024-01-22 23:06:08 发布
935

被折叠的 条评论
为什么被折叠?



