The variable arr that you have declared this way:
Code:
var arr = new Array()
is a private variable inside the function firstStep() so the other method showMe will not be able to access it.
it should be declared as global variable outside the scope of the function like this
Code:
var arr = new Array();
firstStep();
function firstStep(){
for(var i=1;i<=6;i++){
arr[i] = new Image();
arr[i].src = "images/no"+i+".jpg";
alert(arr[i].src);
}
showMe();
}
function showMe(){
alert(arr[1].src);
}
and by the way use semicolons at the end of each javascript command.