fixing js indexes samples

the comments and the js samples do not make sense the way they are, so I swapped them.