(I'm assuming the old value of i is not needed, so i++ and ++i should at most affect performance.)
The thing is, I've seen a counter incremented like this in code
i++;
and it left me wondering: should I suggest to write ++i; because given the semantics of pre-increment and post-increment there's no reason to believe that ++i could ever be slower than i++, whereas there is a little chance that i++ is indeed slower?
My double stems from what I know of C++, and which mostly applies for non-builtin types (see here).
But I don't know enough of JavaScript.
As state above, exactly because I don't know the answer as whether i++ is slower than ++i or not, I'd write ++i because I assume it can't be slower than i++ (otherwise what starnge language would JavaScript be?).
Thinking about Javascript in these kinds of low-level performance terms is not really useful. Different runtimes on different hardware will change how your code is interpreted and how it performs. You don't want to tie your code to a specific platform, runtime, or version, so there's no point worrying about this. If you are incrementing a variable enough times you need to worry about the performance of the increment operator, there is a good chance the problem is your approach rather than the operation.
In general
i++is standard and more readable,++iis useful for when you want to access the value ofiafter it has been incremented. The standard approach would be to stick with what is most readable unless you have a good reason not to.