@@ -350,7 +350,8 @@ assert.partialDeepStrictEqual = function partialDeepStrictEqual(
350350
351351class Comparison {
352352 constructor ( obj , keys , actual ) {
353- for ( const key of keys ) {
353+ for ( let i = 0 ; i < keys . length ; i ++ ) {
354+ const key = keys [ i ] ;
354355 if ( key in obj ) {
355356 if ( actual !== undefined &&
356357 typeof actual [ key ] === 'string' &&
@@ -433,7 +434,8 @@ function expectedException(actual, expected, message, fn) {
433434 expected , 'may not be an empty object' ) ;
434435 }
435436 if ( isDeepEqual === undefined ) lazyLoadComparison ( ) ;
436- for ( const key of keys ) {
437+ for ( let i = 0 ; i < keys . length ; i ++ ) {
438+ const key = keys [ i ] ;
437439 if ( typeof actual [ key ] === 'string' &&
438440 isRegExp ( expected [ key ] ) &&
439441 RegExpPrototypeExec ( expected [ key ] , actual [ key ] ) !== null ) {
@@ -722,7 +724,8 @@ assert.ifError = function ifError(err) {
722724 ) ;
723725 // Filter all frames existing in err.stack.
724726 let newFrames = StringPrototypeSplit ( newErr . stack , '\n' ) ;
725- for ( const errFrame of originalFrames ) {
727+ for ( let i = 0 ; i < originalFrames . length ; i ++ ) {
728+ const errFrame = originalFrames [ i ] ;
726729 // Find the first occurrence of the frame.
727730 const pos = ArrayPrototypeIndexOf ( newFrames , errFrame ) ;
728731 if ( pos !== - 1 ) {
0 commit comments