jquery length of array code example Example 1: jquery count elements var count_elements = $('.class').length; Example 2: length of an array javascript array.length