Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set New Var for an Array

Status
Not open for further replies.

soonkhoo

Programmer
Dec 8, 2000
133
MY
Hi all,

Say I have an array...

var quiz = new Array()

quiz[0] = new quizPage("multi_page_quiz_overview.htm")
quiz[1] = new quizPage("l1r1.htm")
quiz[2] = new quizPage("l1r2.htm")
quiz[3] = new quizPage("l1r3.htm")
quiz[4] = new quizPage("l1r4.htm")
quiz[5] = new quizPage("l1r5.htm")
quiz[6] = new quizPage("multi_page_quiz_summary3.htm")


and i = 0, 1,2,3,4,5,6

how do I create a new var for quiz(i)? Is it

var something = quiz(i)?

thanks

Regards,
Soon
 
Do you mean you need a "copy" of the quiz array?
 
if you are wanting to loop through your array:

for(var i=0; i < quiz.length; i++)
{
alert('quiz');
}

if thats not what you're trying to do, please xplain your problem. adam@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top