{"ScriptPreparationCode":null,"TestCases":[{"Name":"1","Code":"function findSingle(arr) {\r\n let singleOccurence = null;\r\n\r\n arr.forEach((item) =\u003E {\r\n let count = arr.filter(i =\u003E i === item).length;\r\n if (count === 1) {\r\n singleOccurence = item;\r\n }\r\n });\r\n \r\n return singleOccurence;\r\n}\r\n\r\nconst arr = [10, 2, 2 , 1, 0, 0, 10];\r\nfindSingle(arr);","IsDeferred":false},{"Name":"2","Code":"function findSingle(arr) {\r\n let singleOccurence = null;\r\n \r\n for (let i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n let count = arr.filter(el =\u003E el === arr[i]).length;\r\n if (count === 1) {\r\n singleOccurence = arr[i];\r\n break;\r\n }\r\n }\r\n \r\n return singleOccurence;\r\n}\r\n\r\nconst arr = [10, 2, 2 , 1, 0, 0, 10];\r\nfindSingle(arr);","IsDeferred":false}]}