Skip to content
Advertisement

Tag: console

Node.js console.log vs console.info

What is the benefit of using console.log vs console.info? Or any of the other console commands for that matter? vs I thought it might change the color of the output or concatenate some sort of label, but they seem to all do the same thing. And according to the documentation here: https://nodejs.org/api/console.html#console_console_info_data they seem to all do the same as

Webkit Javascript Console – How to use it?

I’m working on a project and there is a ton of js, etc in it. I didn’t write it I’m “taking it over”. There is a piece of Javascript somewhere that is adding top: -50px margin to an element with the id of “footer”. When I look into the page source (through the developer tools) I can right click on

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

In node.js you can use console.log or sys.puts to print out to the screen. What is the preferred method and what is the difference between these? Answer 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”

Advertisement