It's fact the post was unsalvageable and should have been closed.
If a single orthographic error is systematically repeated—not capitalizing the first person personal pronoun "i" several times—that is enough reason to edit.
However the above is still subject to the stronger rule for making or approving an edit: That the edit fixes everything in the post.
Besides that, the edit did not consistently stylize the word "JavaScript" you can see it written with different capitalization and wrong stylizing in the post. The two paragraphs should also have a blank line between them (the prevalent formatting choice.)
In this scenario you aren't doing the editor any favors by approving histheir suggestion. HisTheir work wasn't substantial, approving the edit will encourage continued poor practices, and hethey will lose the +2 rep when the post eventually gets deleted...
EDIT:
The original post has been elaborated on, so I'll extend my answer by pointing out the official guidelines given from https://stackoverflow.com/help/privileges/edit
When should I edit posts?
Tiny, trivial edits are discouraged - try to make the post significantly better when you edit, correcting all problems that you observe.