functiongetWalkSteps(walkTime){if(walkTime%2>0){thrownewError('You cannot come back');}constdistance=walkTime/2;constx=Math.floor(Math.random(distance)*distance);consty=distance-x;returnnewArray(walkTime).fill('e',0,x).fill('n',x,x+y).fill('w',x+y,x+y+x).fill('s',x+y+x,x+y+x+y);}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Here my contribution with javascript language: