javascript for of index value