javascript little program about divers