Skip to content

Way to reduce +=1 to ++ in for loops? #3280

@jamessouth

Description

@jamessouth

Bug report or feature request?

feature req

Uglify version (uglifyjs -V)

3.4.9

JavaScript input

for(var i = 0; i < 3; i += 1){
  console.log(i);
}

The uglifyjs CLI command executed or minify() options used.

uglifyjs [filename.js]

JavaScript output or error produced.

for(var i=0;i<3;i+=1){console.log(i)}

maybe this is a source code issue and outside the scope of minification, just wondering if there was/could be an option to turn +=1 and -=1 to ++ and -- ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions