Python Check Array Size In Js