Convergence problem

Using a fairly simple approach to approximate a function.

var log = console.log
var { acos, pow } = Math
const zeta = (arg, max = 1 / 0) =>
{
 let last = 0
 let sum = 0
 let base = 1
 for(;;)
 {
  sum += 1 / pow(base++, arg) 
  if(sum == last)
   break
  last = sum
  if(base >= max)
   break  
 }
 return sum
}
var pi = acos(-1)
var tau = 2 * pi 
var theta = pow(tau, 2) / 24
log(pi)
log(tau)
log(theta)
log(zeta(2))

For some reason it doesn’t converge as expected though. Any help would be greatly appreciated!