The JavaScript code var strPols = "Matteson:Small:Stratton:Kerner:Walker:Ryan:Blagojevich"; var pols = strPols.split(':'); document.writeln('Indicted Illinois governors: ' + pols.join(', ') + ''); pols.splice(1, 2, "Powell", "Hodge", "Scott", "Rostenkowski", "Reynolds"); document.writeln('Convicted Illinois state-level politicians: ' + pols.join(', ') + ''); document.writeln('Most recent two sent to jail: ' + pols.slice(-2).join(', ') + '');