[javascript mode] Simplify parsing of for loop specs
[javascript mode] Simplify parsing of for loop specs

Closes #5774

namin/CodeMirror,SidPresse/CodeMirror,thomasjm/CodeMirror,wingify/CodeMirror,mtaran-google/CodeMirror,dperetti/CodeMirror,hackmdio/CodeMirror,mtaran-google/CodeMirror,hackmdio/CodeMirror,nightwing/CodeMirror,namin/CodeMirror,namin/CodeMirror,thomasjm/CodeMirror,pabloferz/CodeMirror,thomasjm/CodeMirror,SidPresse/CodeMirror,notepadqq/CodeMirror,dperetti/CodeMirror,notepadqq/CodeMirror,wingify/CodeMirror,pabloferz/CodeMirror,notepadqq/CodeMirror,mtaran-google/CodeMirror,nightwing/CodeMirror,nightwing/CodeMirror,codio/CodeMirror,codio/CodeMirror,SidPresse/CodeMirror,pabloferz/CodeMirror,wingify/CodeMirror,hackmdio/CodeMirror,dperetti/CodeMirror,codio/CodeMirror