Js String And Array Methods In Ruby