Codility “PermMissingElem” Solution
With your JavaScript version, there is not much to optimize. So I am just going to provide some minor improvements:


Within a function, it is better to declare your variables using the var keyword. You should apply this to the i inside for() loop
The JavaScript interpreter is a single thread: this means, unfortunately, you can not perform real parallelism to sum different chunks of the array.
You can choose better variables and function names.