Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged array



1 2 3 Next »
1 445 posted 15 years ago by zb3k
/* ---===[ EXAMPLE ]===--- */ var TT = new AssociativeArray(); TT.add("k-1", "Value 1"); TT.add("k-2", "Value 2"); TT.add("k-3", "Value 3"); TT.add("k-4", "Value 4"); alert(TT.to_string());
1 513 posted 16 years ago by vbert
/* --==[ EXAMPLE ]==-- var colors = new AArray(); colors.add("k01", {bk:"#fff",tk:"b",it:"hello"}); var oC = colors.get("k01"); var tT = ''; for(K in oC) tT += "[" + K + "]: " + oC[K] + "\n"; tT += "\n\n"; tT += oC.bk + "\n"; tT += oC...
1 772 posted 16 years ago by vbert
The important thing to notice is the () operator in a[2]. It is invoking the function inside a[0] with the argument a[1].
1 659 posted 16 years ago by 1man
SEE http://json.org/ for PHP JSON Libraries. grunt knuckle drag brute force ugly escapes for quotes make a php array a json string Produces trailing commas which some Javascript Librarys can't deal with.* _*NOOB NOTE [a comma is added at the...
2 912 posted 16 years ago by inkdeep
1 550 posted 17 years ago by clapfouine
Helps identify correctly the type of whatever you put as an argument. This was adapted from http://www.planetpdf.com/developer/article.asp?ContentID=testing_for_object_types_in_ja
3 725 posted 17 years ago by rolandog
1 2 3 Next »