Console.writeln(...) or console.writeln(...) ?

jmurphy

PTeam Member
Jun 13, 2010
83
37
Basingstoke, England
Console is a Core JavaScript object
console is a static method on the Global object

Should code use Console or console, or does it make no difference?

Thanks
John Murphy
 

Juan Conejero

PixInsight Staff
Sep 2, 2004
7,854
207
57
Valencia, Spain
pixinsight.com
It makes no difference. Personally I always use console because there is one and only one instance of Console (and hence all methods of Console are static), so using a global variable makes more sense in my opinion. But that's a matter of personal preferences, of course.
 

jmurphy

PTeam Member
Jun 13, 2010
83
37
Basingstoke, England
It makes no difference. Personally I always use console because there is one and only one instance of Console (and hence all methods of Console are static), so using a global variable makes more sense in my opinion. But that's a matter of personal preferences, of course.
Thanks.

I watched the An Introduction to PixInsight Scripting with the PJSR video tutorial:
I would really recommend watching it - I now have a much better understanding of a few different areas.

In the tutorial, the 'other' version of console/Console was used compared to my own code, so I just wanted to check... The tutorial was well done, so this was my only outstanding query.

Thanks for providing it
John Murphy