数组去重复操作数组去重复操作

admin2021-02-22  171

import console;
   
console.setTitle("aardio工程10");
  
//var str = console.getText("请输入一行文本,然后回车:");
//console.log("您输入的是" ,str );
  
var tab = {1;2;8;3;4;5;1;2;3;6;8;5;3;9}; 
 var tab2 = {};
 var tab3 = {};
   
 for(i=1;#tab;1){
     
 var key = tab[i] ;
 if not tab2[key]
   {
       table.push(tab3,key);
       tab2[key] = "";
   } 
 }
 console.varDump(tab3);
    
console.pause();
转载请注明原文地址: https://www.aardio.net/read-155.html
最新回复(0)