Ruby Convert Array To String Javascript Mdn Addeventlistener