System Verilog Array Functions Javascript