{"ScriptPreparationCode":"const getRandomInteger = (min, max) =\u003E {\r\n const internalMin = Math.ceil(min)\r\n const internalMax = Math.floor(max)\r\n\r\n return Math.floor(Math.random() * (internalMax - internalMin)) \u002B internalMin\r\n}\r\n\r\nconst alphabet = [\u0027A\u0027, \u0027a\u0027, \u0027B\u0027, \u0027b\u0027, \u0027C\u0027, \u0027c\u0027, \u0027D\u0027, \u0027d\u0027, \u0027E\u0027, \u0027e\u0027, \u0027F\u0027, \u0027f\u0027, \u0027G\u0027, \u0027g\u0027, \u0027H\u0027, \u0027h\u0027, \u0027I\u0027, \u0027i\u0027, \u0027J\u0027, \u0027j\u0027, \u0027K\u0027, \u0027k\u0027, \u0027L\u0027, \u0027l\u0027, \u0027M\u0027, \u0027m\u0027, \u0027N\u0027, \u0027n\u0027, \u0027O\u0027, \u0027o\u0027, \u0027P\u0027, \u0027p\u0027, \u0027Q\u0027, \u0027q\u0027, \u0027R\u0027, \u0027r\u0027, \u0027S\u0027, \u0027s\u0027, \u0027T\u0027, \u0027t\u0027, \u0027U\u0027, \u0027u\u0027, \u0027V\u0027, \u0027v\u0027, \u0027W\u0027, \u0027w\u0027, \u0027X\u0027, \u0027x\u0027, \u0027Y\u0027, \u0027y\u0027, \u0027Z\u0027, \u0027z\u0027]\r\n\r\nconst getRandomString = (length) =\u003E\r\n Array.from({\r\n length\r\n }, () =\u003E\r\n alphabet[getRandomInteger(0, alphabet.length)]).join(\u0027\u0027)\r\n\r\nwindow.unsortedArray = Array.from({\r\n length: 50\r\n}, () =\u003E getRandomString(getRandomInteger(5, 15)))\r\nwindow.sortedArray = [...unsortedArray].sort()\r\n\r\nwindow.unsortedSet = new Set([...unsortedArray])\r\nwindow.sortedSet = new Set([...sortedArray])\r\n\r\nwindow.existingItem = unsortedArray[getRandomInteger(0, unsortedArray.length)]\r\nwindow.unexistingItem = getRandomString(25)","TestCases":[{"Name":"unsorted array includes existing item","Code":"unsortedArray.includes(existingItem)","IsDeferred":false},{"Name":"sorted array includes existing item","Code":"sortedArray.includes(existingItem)","IsDeferred":false},{"Name":"unsorted array includes unexisting item","Code":"unsortedArray.includes(unexistingItem)","IsDeferred":false},{"Name":"sorted array includes unexisting item","Code":"sortedArray.includes(unexistingItem)","IsDeferred":false},{"Name":"unsorted set has existing item","Code":"unsortedSet.has(existingItem)","IsDeferred":false},{"Name":"sorted set has existing item","Code":"sortedSet.has(existingItem)","IsDeferred":false},{"Name":"unsorted set has unexisting item","Code":"unsortedSet.has(unexistingItem)","IsDeferred":false},{"Name":"sorted set has unexisting item","Code":"sortedSet.has(unexistingItem)","IsDeferred":false}]}