{"ScriptPreparationCode":null,"TestCases":[{"Name":"loop","Code":"const arr = [10, 2, 5, 110, 1, 9, 11];\r\nlet res = []\r\n for (let i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n for (let j = 0; j \u003C arr.length; j\u002B\u002B) {\r\n if (arr[i] \u003C= res[j]) {\r\n res.splice(j,0,arr[i]); \r\n break;\r\n }\r\n }\r\n if (arr[i] \u003E res[res.length-1] || res.length == 0) {\r\n res.push(arr[i]);\r\n }\r\n }\r\nconsole.log(res)","IsDeferred":false},{"Name":".sort","Code":"const arr = [10, 2, 5, 110, 1, 9, 11];\r\nconst sortNumbers = (arr) =\u003E {\r\n console.log([...arr].sort((a, b) =\u003E a - b));\r\n};","IsDeferred":false}]}