Updated arrays in js