{"ScriptPreparationCode":null,"TestCases":[{"Name":"temp swap","Code":"let arr = [1,4,6]\r\nlet len = arr.length\r\nlet temp = 0\r\n\r\nfor(let i=0; i\u003CMath.floor(arr.length/2); i\u002B\u002B){\r\n \r\n let x = i\r\n let y = len-1-i\r\n \r\n temp = arr[x]\r\n arr[x] = arr[y]\r\n arr[y] = temp \r\n \r\n}\r\n\r\nconsole.log(arr)","IsDeferred":false},{"Name":"xor swap","Code":"let arr = [1,4,6]\r\nlet len = arr.length\r\n\r\nfor(let i=0; i\u003CMath.floor(arr.length/2); i\u002B\u002B){\r\n \r\n let x = i\r\n let y = len-1-i\r\n \r\n arr[x] = arr[x] ^ arr[y]\r\n arr[y] = arr[x] ^ arr[y]\r\n arr[x] = arr[x] ^ arr[y]\r\n \r\n}\r\n\r\nconsole.log(arr)","IsDeferred":false},{"Name":"inbuilt","Code":"let arr= [1,2,3]\r\narr.reverse()\r\nconsole.log(arr)","IsDeferred":false},{"Name":"manual rvers","Code":"let arr=[1,2,3], res =[]\r\nfor(let i=arr.length-1; i\u003E=0; i--) {\r\n\tres = arr[i]\r\n}\r\n\r\nconsole.log(res)","IsDeferred":false}]}