Associative array is an array with named indexes. In Javascript, there is no concept called associative arrays. In javascript we call them as objects.
Below is an example to find the length of the object.
var employee = [];
employee['first name'] = 'Raju';
employee['name'] = 'Raghu';
employee['age'] = 28;
var length = Object.keys(employee).length;