1var judgeCircle = function (moves) {2 let x = 0,3 y = 0;4 for (i = 0; i < moves.length; i++) {5 switch (moves[i]) {6 case "R":7 x++;8 break;9 case "L":10 x--;11 break;12 case "U":13 y++;14 break;15 case "D":16 y--;17 break;18 }19 }20 return x === 0 && y === 0;21};
WPM •0 •0
ACC •0 •0
TIME •0