/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ gTestfile = '12.2.js'; START("12.2 - For-in statement"); // All the employee names e = Joe 20 Sue 30 ; correct = new Array("Joe", "Sue", "Big Screen Television", "1299.99"); i = 0; for (var n in e..name) { TEST("1."+i, String(i), n); i++; } TEST("1.count", 2, i); // Each child of the first item order = John Smith Big Screen Television 1299.99 DVD Player 399.99 ; i = 0; for (var child in order.item) { TEST("2."+i, String(i), child); i++ } TEST("2.count", 2, i); i = 0; for (var child in order.item[0].*) { TEST("3."+i, String(i), child); i++ } TEST("3.count", 2, i); END();