CodeCombat needs a console.log function


#1

How come codecombat doesn’t have a console.log function because I want to see the value of something.
Instead console.log never works, for example, I tried console.log(x: diffX, y: diffY);
I get this error:

or maybe they could add a this.logInToConsole function to all heroes.


#2

I really want to see the value!!!


#3

One of the only ways to debug is with a the Say command.

this.say("Hello! " + variable);

#4

In Zero Sum (and Zero Sum only right now), you can use this.debug as an alias for console.log. It’s pretty limited, and it cuts off after 200 log outputs, but you can log most types of objects.


#5

I struggle with the part that why I don’t know the value of variable I take.Thank you for the clue