B2G/gecko/js/src/jit-test/tests/for-of/strings.js
// for-of works on strings and String objects.
for-of works on strings and String objects.
for - of works on strings and String objects .
function test(s) {
    var copy = '';
    for (var v of s) {
        assertEq(typeof v, 'string');
        assertEq(v.length, 1);
        copy += v;
    }
    assertEq(copy, String(s));
}
function test ( s ) { var copy = '' ; for ( var v of s ) { assertEq ( typeof v , 'string' ) ; assertEq ( v . length , 1 ) ; copy += v ; } assertEq ( copy , String ( s ) ) ; }
for-of works on strings and String objects.
for - of works on strings and String objects .