How To Check Array Size In Javascript