`parseInt(..., 0)` ? Typo or you meant it?. Also, one `var`.