michael@0: expected = 4; michael@0: michael@0: var fourth = { nextSibling: null }; michael@0: var third = { nextSibling: fourth }; michael@0: var second = { nextSibling: third }; michael@0: var first = { nextSibling: second }; michael@0: michael@0: function f() { michael@0: let loopcount = 0; michael@0: for (let node = first; node; node = node.nextSibling) { michael@0: loopcount++; michael@0: } michael@0: return loopcount; michael@0: } michael@0: michael@0: actual = f(); michael@0: michael@0: assertEq(actual, expected);