Use Js.array_get/array_set or Js.Unsafe.get/set.
val array_get : 'a #js_array t -> int -> 'a optdef
val array_set : 'a #js_array t -> int -> 'a -> unit
To support overloading on ocaml, js_of_ocaml removes letters after last _ in javascript name. So "deck_nr" becames "deck" in generated js, so add another "_".
Put all it together...
let table_decks = (Js.Unsafe.variable "table_decks" :>
< deck_nr_ : int Js.prop > Js.t Js.js_array Js.t)
let get a n =
match Js.Optdef.to_option (Js.array_get a n) with
| Some n -> n##deck_nr_
| None -> 0