{"ScriptPreparationCode":"\r\n\r\nconst alpha = \u0027abcdefghijklmnopqrstuvwxyz\u0027;\r\nconst keys = [];\r\n\r\nfor( let i = 0; i \u003C alpha.length; i\u002B\u002B ) {\r\n for( let j = 0; j \u003C alpha.length; j\u002B\u002B ) {\r\n for( let k = 0; k \u003C alpha.length; k\u002B\u002B ) {\r\n \t\tkeys.push( alpha[ i ] \u002B alpha[ j ] \u002B alpha[ k ] );\r\n }\r\n }\r\n}\r\n\r\nfunction shuffle(array) {\r\n let currentIndex = array.length, randomIndex;\r\n\r\n // While there remain elements to shuffle...\r\n while (currentIndex != 0) {\r\n\r\n // Pick a remaining element...\r\n randomIndex = Math.floor(Math.random() * currentIndex);\r\n currentIndex--;\r\n\r\n // And swap it with the current element.\r\n [array[currentIndex], array[randomIndex]] = [\r\n array[randomIndex], array[currentIndex]];\r\n }\r\n\r\n return array;\r\n}\r\n\r\nfunction fill( obj ) {\r\n shuffle( keys ).forEach( key =\u003E {\r\n obj[ key ] = key;\r\n } );\r\n return obj;\r\n}","TestCases":[{"Name":"for in","Code":"const obj1 = fill( {} );\r\nconst obj2 = fill( {} );\r\nlet matches = 0;\r\nfor( const key in obj1 ) {\r\n if( obj1[ key ] === obj2[ key ] ) matches\u002B\u002B;\r\n}\r\nconsole.log( matches );","IsDeferred":false},{"Name":"Object keys sorted","Code":"const obj1 = fill( {} );\r\nconst obj2 = fill( {} );\r\nconst obj1Keys = Object.keys( obj1 ).sort();\r\nconst obj2Keys = Object.keys( obj2 ).sort();\r\nconst numKeys = obj1Keys.length;\r\nlet matches = 0;\r\nfor( let i = 0; i \u003C numKeys; i\u002B\u002B ) {\r\n if( obj1[ obj1Keys[ i ] ] === obj2[ obj2Keys[ i ] ] ) matches\u002B\u002B;\r\n}\r\nconsole.log( matches );","IsDeferred":false}]}