题目地址:https://leetcode-cn.com/problems/walking-robot-simulation/description/
var robotSim = function (commands, obstacles) {
let obstacle = {
}, x = 0, y = 0, res = 0;
let direction = 0; //0 = north, 1 = east, 2 = south, 3 = west
for (let i = 0