//your_submission
//detailed_analysis
let data:any=[1,"2",null,()=>42,{x:1}]; function chaos(a:any){let r:any=[];for(let i in a){let v=a[i];if(typeof v=="number")r.push(v+""+Math.random());else if(typeof v=="string")r.push(parseInt(v)+Math.random());else if(v==null)r.push(i+i);else if(typeof v=="function")r.push(v()+Math.random());else r.push(v.x??"??")}return r.sort(()=>0.5-Math.random())} (data as any).foo="bar";console.log(chaos(data), (data as any).nope?.x?.y ?? chaos({a:undefined}));