100% ||JavaScript ||Recursion
\n\n# Code\n\nvar minMaxGame = function(nums) {\n  if(nums.length===1) return nums;\n  let newNums = [];\n  let flag = true;\n  for(let i=0;i<nums.length;i=i+2)
\n\n# Code\n```\nvar minMaxGame = function(nums) {\n  if(nums.length===1) return nums;\n  let newNums = [];\n  let flag = true;\n  for(let i=0;i<nums.length;i=i+2){ // i=4 nums= [1,5]\n      if(flag){\n          let val = Math.min(nums[i],nums[i+1]);\n          newNums.push(val);\n          flag = false\n      }else{\n        let val = Math.max(nums[i],nums[i+1])  \n          newNums.push(val)\n          flag = true;\n      }\n  }\n  return minMaxGame(newNums)\n};\n```
['JavaScript']