Because we are working in the debugging console, it behaves like a terminal that takes commands, executes them and responds. When we submit our code, it is entered in the command line. What we are seeing here is the response to the final line in the code,
susan2.age = 24;
To the console this is a command (a statement in our program, albeit) and the response is the value that was just assigned,
The IDE we are working in does not use color coding so we cannot tell logging from artifact echoes. Run the code in
repl.it and you will see the output in green, as,
The surest way to prevent an echo is to log something as the last statement, such as,
Also, when logging inside a program that sets a variable, if at all possible, set the variable first, then log whatever it is to be logged. This prevents the assignment from echoing when the code ends.