remove unused repeats variable js