{"ScriptPreparationCode":"var myArr = [\u0027a\u0027,\u0027b\u0027,\u0027c\u0027,\u0027d\u0027,\u0027e\u0027,\u0027f\u0027,\u0027g\u0027,\u0027h\u0027,\u0027i\u0027,\u0027j\u0027,\u0027k\u0027,\u0027l\u0027,\u0027m\u0027,\u0027n\u0027,\u0027o\u0027,\u0027p\u0027,\u0027q\u0027,\u0027r\u0027,\u0027s\u0027,\u0027t\u0027,\u0027u\u0027,\u0027v\u0027,\u0027w\u0027,\u0027x\u0027,\u0027y\u0027,\u0027z\u0027];\r\nvar myDict = _.keyBy(myArr);\r\nfunction randomChar(charType = \u0022any\u0022) {\r\n const lowercase = \u0022abcdefghijklmnopqrstuvwxyz\u0022;\r\n const uppercase = \u0022ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0022;\r\n const digits = \u00220123456789\u0022;\r\n let characters = \u0022\u0022;\r\n\r\n switch (charType) {\r\n case \u0022lower\u0022:\r\n characters = lowercase;\r\n break;\r\n case \u0022upper\u0022:\r\n characters = uppercase;\r\n break;\r\n case \u0022digit\u0022:\r\n characters = digits;\r\n break;\r\n default:\r\n characters = lowercase \u002B uppercase \u002B digits;\r\n break;\r\n }\r\n\r\n const randomIndex = Math.floor(Math.random() * characters.length);\r\n return characters[randomIndex];\r\n}","TestCases":[{"Name":"find","Code":"if (myArr.find((l) =\u003E l === randomChar())) {\r\n console.log(\u0022array has \u0027m\u0027\u0022);\r\n}","IsDeferred":false},{"Name":"d","Code":"if (myDict[randomChar()]) {\r\n console.log(\u0022dict has \u0027m\u0027\u0022);\r\n}","IsDeferred":false}]}