{"ScriptPreparationCode":"function makeId(length) {\r\n\tlet result = \u0027\u0027;\r\n\tconst characters = \u0027ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\u0027;\r\n\tconst charactersLength = characters.length;\r\n\tfor (let i = 0; i \u003C length; i\u002B\u002B) {\r\n\t\tresult \u002B= characters.charAt(Math.floor(Math.random() * charactersLength));\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nfunction makeToggle() {\r\n\treturn { [makeId(16)]: 1 }\r\n}\r\n\r\nconst togglesCount = 100;\r\nvar togglesOn = Array(togglesCount);\r\n\r\n// Generate a number of random toggles\r\nfor(i = 0; i \u003C togglesCount; i\u002B\u002B) {\r\n\ttogglesOn[i] = makeToggle();\r\n}\r\n\r\n// Check the last one for a worst-case scenario\r\nconst lastToggle = togglesOn[togglesCount - 1];\r\nvar toggleToCheck = Object.keys(lastToggle)[0];","TestCases":[{"Name":"Find (current)","Code":"return !!togglesOn.find((toggle) =\u003E {\r\n\treturn toggle[toggleToCheck] === 1;\r\n});","IsDeferred":false},{"Name":"Some","Code":"return togglesOn.some(toggle =\u003E toggle[toggleToCheck] === 1)","IsDeferred":false},{"Name":"Includes","Code":"return togglesOn.includes({ [toggleToCheck]: 1 });","IsDeferred":false}]}