https://jsperf.com/for-in-versus-traditional
(note how the version we're using is more than 20x slower)
sadly... the second version takes up a lot more space — I think I have a solution, but I'll test it later.
Edit: my solution was the last one. Yes, it is faster than the slowest one, however, it is still slower than just writing it all out. This could just be the if statement's minor impact (this is a simple script after-all), maybe not though.
https://jsperf.com/for-in-versus-traditional (note how the version we're using is more than 20x slower) sadly... the second version takes up a lot more space — I think I have a solution, but I'll test it later.
Edit: my solution was the last one. Yes, it is faster than the slowest one, however, it is still slower than just writing it all out. This could just be the if statement's minor impact (this is a simple script after-all), maybe not though.