Matlab Assign Array Elements Javascript Interview