{"ScriptPreparationCode":"var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30];\r\nvar letters = [\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 mixed = [ 1, \u0027b\u0027, 3, \u0027d\u0027, 5, \u0027f\u0027, 7, \u0027h\u0027, 9, \u0027j\u0027, 11, \u0027l\u0027, 13, \u0027n\u0027, 15, \u0027p\u0027, 17, \u0027r\u0027, 19, \u0027t\u0027, 21, \u0027v\u0027, 23, \u0027x\u0027, 25, \u0027z\u0027 ];\r\n\r\nfunction indexByIndexOf (array, value) {\r\n return array.indexOf(value)\r\n}\r\n\r\nfunction indexByFor (array, value) {\r\n for (var i=0; i \u003C array.length; i\u002B\u002B) {\r\n if(array[i] === value) {\r\n return i;\r\n }\r\n }\r\n}\r\n\r\nfunction indexByForOf (array, value) {\r\n var i = 0;\r\n for (var currVal of array) {\r\n i\u002B\u002B;\r\n if(currVal === value) {\r\n return i;\r\n }\r\n }\r\n}","TestCases":[{"Name":"indexOf","Code":"var numberindex = indexByIndexOf(numbers, 27);\r\nvar letterindex = indexByIndexOf(letters, \u0027x\u0027);\r\nvar mixedIndex = indexByIndexOf(mixed, \u0027x\u0027);","IsDeferred":false},{"Name":"for","Code":"var numberindex = indexByFor(numbers, 27);\r\nvar letterindex = indexByFor(letters, \u0027x\u0027);\r\nvar mixedIndex = indexByFor(letters, \u0027x\u0027);","IsDeferred":false},{"Name":"for of","Code":"var numberindex = indexByForOf(numbers, 27);\r\nvar letterindex = indexByForOf(letters, \u0027x\u0027);\r\nvar mixedIndex = indexByForOf(letters, \u0027x\u0027);","IsDeferred":false}]}