Platinum Partner

Hash Table - Playing

// Code tell all!
//Any question info (a) inov.es


//I see this this simple implementation Hash table
var Hash = function(){
		var indexes = new Array();
		var values	= new Array();
		//objHash.set('indexName', 123)
		this.set = function(name,value){
			var locationIndex = indexes.indexOf(name);
			if(locationIndex==-1){
				locationIndex = indexes.length;
				indexes[locationIndex] = name;
			}
			//values[locationIndex] = value;
			values[indexes.indexOf(name)]=value;
		}
		//objHash.get('indexName')
		this.get = function(name){
			return values[indexes.indexOf(name)];
		}
		
		//objHash.each(function(index,value))
		this.each = function(callback){
			document.write(indexes.length)
 			for(var i=0;i");

names.each(function(index,value){
	document.write("
  • " + index + " - "+value+"
  • "); } //This is very fun, but....
    //...you can use Javascript Hash native object var objc = {'steven':10, 'lise':200, 'arthur':300}; objc['maria']=1000; var ind = 'artur'; objc[ind]=7000; for (x in objc) { document.write(objc[x]+' - '+x+'
    '); };
    {{ tag }}, {{tag}},

    {{ parent.title || parent.header.title}}

    {{ parent.tldr }}

    {{ parent.urlSource.name }}
    {{ parent.authors[0].realName || parent.author}}

    {{ parent.authors[0].tagline || parent.tagline }}

    {{ parent.views }} ViewsClicks
    Tweet

    {{parent.nComments}}