HTML/CSS/JavaScript 解法, 执行用时: 855ms, 内存消耗: 77824KB, 提交时间: 2020-11-23
{"css":"","js":"function truncate(arr) {\nlet arr2 = []\n for (let i = 0; i < arr.length; i++) {\n arr2.push(arr[i])\n }\n arr2.splice(arr2.length - 1, 1)\n return arr2\n}","html":"","libs":[]}
HTML/CSS/JavaScript 解法, 执行用时: 858ms, 内存消耗: 77812KB, 提交时间: 2020-12-27
{"css":"","js":"function truncate(arr) {\n var su = [];\n for(var i = 0; i < arr.length - 1; i++){\n su.push(arr[i]);\n }\n return su;\n}","html":"","libs":[]}
HTML/CSS/JavaScript 解法, 执行用时: 858ms, 内存消耗: 77824KB, 提交时间: 2020-11-23
{"css":"","js":"function truncate(arr) {\n let newArr=[]\n for(let i=0;i<arr.length-1;i++){\n newArr.push(arr[i])\n}\n return newArr\n}","html":"","libs":[]}
HTML/CSS/JavaScript 解法, 执行用时: 858ms, 内存消耗: 77860KB, 提交时间: 2020-11-23
{"css":"","js":"function truncate(arr) {\n let result =[]\n for(let i=0; i<arr.length-1; i++){\n result.push(arr[i])\n }\n return result\n}","html":"","libs":[]}
HTML/CSS/JavaScript 解法, 执行用时: 858ms, 内存消耗: 77868KB, 提交时间: 2020-12-26
{"css":"","js":"function truncate(arr) {\n var newarr=arr.slice(0);\n newarr.pop();\n return newarr;\n}","html":"","libs":[]}