Javascript code displaying error on for loop : What's the problem in this javascript code,there is a constant red line under the for loop, The code does work in a Java class but not in javascript:

    <%!
              EntityManagerFactory emf = javax.persistence.Persistence.createEntityManagerFactory("Dima_TestPU");
            RegionJpaController djc = new RegionJpaController(emf); 
            List<Region> lstRegion = djc.findRegionEntities(); 
            for( Region device : lstRegion ) {
                System.out.println(device.getId());
                System.out.println(device.getName());
                System.out.println(device.getLatitude());
            }
    %>

