Added array length call in client side js