Just for fun I tried it on jsperf and the first one is way faster. Never thought that. But it's probably just a micro optimization.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.