Sorting in JavaScirpt

I just realized that I have a need to sort a JSON array with multiple properties for each node in the array. I found this howto very useful. All I needed was to provide a comparison function that knows how to compare my complex data structure, plugged it into the sort algorithm to sort the […]

Read more "Sorting in JavaScirpt"

A simple JavaScript trick

Given a JSON array, or any JavaScript object array, how do I find out the size or the length of the array without a length or size property? This is actually a very simple to solve. Just use for ( x in y) statement and use a counter variable to increment the count while you […]

Read more "A simple JavaScript trick"