Thanks, but the catch is that the problem asks that I dont use arrays. This is a class I took as an elective for the hell of it, didnt buy the book, and now wanna get over with...
I guess i cant do it the way i had thought, so it will have to be much sloppier
Just don't ever use eval like that in actual practice. Eval is the javascript equivilent of goto - occasionally needed, but generally disliked due to how easy it is to abuse it and produce slow ugly code.