Difference between console.log and sys.puts in node.js?

sys.puts simply prints the given string in the logs.

But if you want to print a more complex object (Array, JSON, JSObject) you have to use console.log because you want to “look inside” of the object.

sys.puts would give you only “[object object]” for example.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)