You would use sum(range()) in a Python though. Remember that many things you do manually in JS have a better, automatic and faster way in the stlib.
Besides, if calculations are important, you would use numpy.
Ah yes. sum(range()) in Python vs for(i=1...) in js was much closer, about 20% quicker in javascript.
Won't this calculation overflow to +Infinity in JavaScript after a while? On the other hand, Python will try to compute the actual result using arbitrary precision integers, which is that's slower.