Talk:Aj
Jump to navigation
Jump to search
Interpreter
Since I had already made a interpreter for Ja :
var code = prompt("Code ? (j and a only)"); var input = prompt("Input ? (number)") var carac = 0; var tab = []; var zone = 0; while (code.substr(carac, 1) != "") { if (code.substr(carac, 1) == "j") { carac = input - 1; zone = input; } else if (code.substr(carac, 1) == "a") { if (tab[zone] != undefined) { tab[zone] = tab[zone] + 1; } else { tab[zone] = 1; } } carac += 1; } document.write(tab);