JavaScript Array extended