I am using the for command and when I do for(i < 4) { i++ } it pops out: Unexpected token ) at line *line of the command*
I have tried moving some variables and moving where the for command is, even checking StackOverflow, but I can not find an answer. This is strange since it has not happened in the past.
function learnEng() {
    while(generationNum <= generations) {
        for(i <= 4) {
            i++;
        }
    document.write("<h2>sentence "+generationNum+": "+output+"</h2>");
        generationNum++;
        }
}
learnEng();
I didn't expect to get the error because this is the first time I have gotten it, and it spat out an error, and Its sometimes on the line that the for(){} command is on and sometimes it is not, but I know the for(){} command is causing it because it doesn't happen when its not there.
 
     
    