blob: 99ba10ed328ed431809976e8e1b010b3b068d2d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
description("This page tests iteration of properties on a string object.");
var stringProperties = new Array();
var i = 0;
for (var property in "abcde") {
stringProperties[i++] = property;
}
shouldBe('stringProperties.length', '5');
shouldBe('stringProperties[0]', '"0"');
shouldBe('stringProperties[1]', '"1"');
shouldBe('stringProperties[2]', '"2"');
shouldBe('stringProperties[3]', '"3"');
shouldBe('stringProperties[4]', '"4"');
|