Python Array Slice Function Javascript Definition Functions