Just call the standard System.Console.WriteLine methods from .NET, and they will be translated to the right calls in JavaScript.