Challenge #3

Can you solve this challenge? Always be careful when running arbitrary code found on the Internet!

(S=(n,o,r="")=>{for(i=0;i<w;i++)o[i][0].pop(),o[i][0].unshift(0),Math.abs(n/4%2)&&(o[i][1].pop(),o[i][1].unshift(0));if(n>0)for(i=0;i<4;i++)o[Math.random()*w|0][i%2][0]++;for(j=0;j<h;j++){for(i=0;i<w;i++)r+=o[i][0][j]+o[i][1][j]>0?"*":" ";r+=`
`}console.log(r),n>2*-t&&setTimeout(g=>S(n-4,o),t)})(t=100,[...new Array(w=80)].map(i=>[0,0].map(i=>new Array(h=25).fill(0))))

 

 

Puzzle made by:


Per Olsson
Application Security Advisor

Per has a background as a Developer but works today with Security and Privacy within Visma to teach developers and employees to find, stop and prevent hackers from doing harm.