iterables-iteration-undefined.js (605B)
1 // Copyright (C) 2025 Kevin Gibbons. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-iterator.zipkeyed 6 description: > 7 undefined-valued properties are skipped in "iterables" iteration. 8 includes: [compareArray.js] 9 features: [joint-iteration] 10 ---*/ 11 12 13 var iterables = { 14 a: undefined, 15 b: ['value for b'], 16 }; 17 18 var result = Array.from(Iterator.zipKeyed(iterables)); 19 20 assert.sameValue(result.length, 1); 21 assert.compareArray(Reflect.ownKeys(result[0]), ["b"]); 22 assert.compareArray(Object.values(result[0]), ["value for b"]); 23 24 reportCompare(0, 0);