js array.foreach continue