I have completed iteration 1 of the Mars Rover program using JavaScript, which allows my rover to move in all directions within a 2-dimensional space (x,y). Now, I am moving on to iteration #2 where I need to give a series of commands to the rover and have them executed sequentially.
Can you provide some insights on how to approach iteration 2?
Here is the current code snippet I am working with:
// --------- Mars Rover Kata: Iteration #1 ------------ \\
// ------------------- User Experience via Console --------- \\
var promptSay = "Play with the Console!\nW = UP \nS = DOWN \nD = RIGHT \nA = LEFT";
var gridEdge = "You can't go there! \n\nPlease note that you are playing within an imaginary grid, and the farthest you can go is 9 steps.";
var wrongInput = "---WRONG INPUT!--- Please use correct input i.e.: \nW = UP \nS = DOWN \nD = RIGHT \nA = LEFT";
// Object Definition: (Vars inside a Var, may include functions) \\
...