在JavaScript中打破嵌套循环的最佳方法是什么?
在Javascript中打破嵌套循环的最佳方法是什么?
//Write the links to the page.for (var x = 0; x < Args.length; x++){ for (var Heading in Navigation.Headings) { for (var Item in Navigation.Headings[Heading]) { if (Args[x] == Navigation.Headings[Heading][Item].Name) { document.write("<a href=\"" + Navigation.Headings[Heading][Item].URL + "\">" + Navigation.Headings[Heading][Item].Name + "</a> : "); break; // <---HERE, I need to break out of two loops. } } }}
牛魔王的故事
www说
慕桂英3389331
相关分类