`converted` needs to be declared with var.  Please declare converted before the `for` loop.