I'm having problems figuring out this javascript:


var string = "8ac249fbd363fx52j1";
var enigma = "";
var whatisthis = "var myxor = prompt('Password:','');

for (y=1; y<5; y++)
enigma += (string.indexOf(y)+1);
enigma += 5;
if (myxor==enigma)
enigma = enigma + '.php';location.href=enigma;



I kind of separated it a little bit for it to be somewhat understandable. For those who might recognize it, this is some source code for the first level of the Mod-X wargame. I'm a real newbie at this and can't get some of it....mainly I don't understand what += means. Can anyone help?

[Edit: This is me assuming this is javascript. I mean, I see the script tag, but I don't know if it's java. Just a naive assumption. Correct me if I'm wrong]