The assumption in this article is that as long as a line of code as the same characters, its output will be the same. But this makes no sense. Consider:
var arr = [0,1,2]
sum(arr);
arr = [1,2,3];
sum(arr);
The two sums will have different results. What the article does is in essence calling sum([Math.Random(), Math.Random(), Math.Random()]);
sum([Math.Random(), Math.Random(), Math.Random()]);
I don't see why one would expect the output of such a call to be always the same, if you are in all effect changing the input. Even if the characters you typed are the same, if the values that are passed around change the result of a function call will change. "Pure" is a property with regards to the values passed to a function, not to the characters typed to call it.