Refined js for linting (semicolons and for loop)