I can't figure away around this, I want the MD array to store the name of a book and the price. I know this is easier with two arrays but really wanted to give a MD array ago in javascript. I have tried several ways but can only get the book name or the book price to display twice. Any help would be greatly appreciated.
var bookName = new Array();
for (var i = 0; i < 3; i++)
{
bookName[i] = new Array();
for (var j = 0; j < 1; j++)
{
bookName[i] = prompt("Please enter book name!");
bookName[[i][j]] = prompt("Please enter book price!");
document.write(bookName[i] + bookName[[i][j]] + "</br>");
}
}
[["name", "price"], ["name2", "price2"]]"?